Donate

If you find any of the plugins I write useful then please consider making a donation. These donations can be used to offset the cost of my web hosting allowing me to produce more plugins for the e107 community

Welcome

Username:

Password:


Remember me

Gluons Gluons

Login to view your stats

Online

Guests: 12, Members: 0 ...

most ever online: 377
(Members: 0, Guests: 377) on 07 Jun : 07:44

Members: 1222
Newest member: rsetser

Forums

e107 Gold :: Forums :: Gold System Forums :: General Discussion
 
<< Previous thread | Next thread >>
making a button deduct gold
Moderators: Main Admin, =Johnny=, Gold Father, raziel23x, 2dopey, schlrech, nlstart, gary231178, SimonP, fivestar, ^Shei^
Author Post
orb

Thu Sep 17 2009, 10:17am

[ ]
LAN_THEME_14
Member: 6
Joined: 14-Jul-2007

Posts: 37
Gluons: gold 57,369
Spent: gold 117,055

Send a present to this user
View their 2 presents
View their 1 assets
Games Console 
I was wondering if there is a simple code to add to a php page to make a simple transaction?

Eg. I have a page with a question, text field to fill in the answer and a submit button.

Is there a way to have a generic bit of code placed that when the "submit" button is clicked a certain amount is deducted from the user and the info sent to the "transaction list" ?

[ image disabled ]
Back to top
SassIRC

Mon Feb 08 2010, 07:04pm
[ ]
Member: 687
Joined: 7-Jul-2009

Posts: 37
Gluons: gold 12,390
Spent: gold 69,450

Send a present to this user
View their 0 presents
View their 1 assets
Big TV 
most definitly, all it requires is some php/mysql code

first, because ur using a submit button

check if this exists
$_POST[your button name]

if it does

use mysql to extract the amount from the existing database.
then use mysql again to insert the necessary "transaction" into the "gold history" mysql database.
Back to top
nud

Fri Jul 01 2011, 10:03pm
[ ]
Member: 680
Joined: 14-Feb-2009

Posts: 6
Gluons: gold 2,610
Spent: gold 53,900

Send a present to this user
View their 0 presents
View their 0 assets

nice

Back to top
gregtampa

Mon Apr 16 2012, 04:13pm
[ ]
Member: 943
Joined: 3-Apr-2012

Posts: 8
Gluons: gold 36,590
Spent: gold 16,650

Send a present to this user
View their 0 presents
View their 1 assets
Big TV 
there sample sql code for that?..
should this just be made into a function?

Back to top
 

Jump:     Back to top

Last seen

  • rsetser gold 44,250
    [ 7 months, 2 weeks, 4 days, 19 hours, 45 mins, 16 secs ago ]
  • diehard gold 23,475
    [ 4 years, 10 months, 3 weeks, 6 days, 7 hours, 47 mins, 59 secs ago ]
  • pss0ft gold 49,700
    [ 4 years, 11 months, 1 week, 1 day, 21 hours, 52 mins, 9 secs ago ]
  • gefy gold 300,240
    [ 4 years, 11 months, 2 weeks, 6 days, 23 hours, 0 mins, 53 secs ago ]
  • Hiroyuki0487 gold 44,600
    [ 5 years, 1 month, 2 days, 13 hours, 18 mins, 35 secs ago ]
  • swedsnake gold 23,540
    [ 5 years, 1 month, 3 days, 10 hours, 19 mins, 56 secs ago ]
  • stedie gold 9,326
    [ 5 years, 1 month, 4 weeks, 19 hours, 25 mins, 16 secs ago ]
  • orb gold 339,720
    [ 5 years, 2 months, 20 hours, 8 mins, 2 secs ago ]
  • rossv gold 49,150
    [ 5 years, 2 months, 1 week, 1 day, 16 hours, 2 mins, 49 secs ago ]
  • orb gold 52,358
    [ 5 years, 2 months, 2 weeks, 4 days, 17 hours, 23 mins, 39 secs ago ]

Online

Guests: 12 Members: 0

    On this page: 1
    Members: 1222, Newest: rsetser

    Online

    Guests: 12, Members: 0 ...

    most ever online: 377
    (Members: 0, Guests: 377) on 07 Jun : 07:44

    Members: 1222, Newest member: rsetser

    Unanswered Posts

    The following forum posts remain unanswered
    just testing 05 May : 22:21
    Dead Site 05 May : 01:41
    Paypal return a[...] 24 Oct : 17:02
    paypal fail 24 Oct : 16:39
    Auto Userclass 09 Mar : 20:53
    Wishing well Qu[...] 01 Sep : 17:51
    Banner Ads for [...] 30 May : 22:43
    Golf For Calend[...] 30 May : 22:40
    to set up to a [...] 17 Feb : 20:48
    content plugin [...] 11 Oct : 01:32

    View all unanswered posts
    Render time: 0.0819 sec, 0.0189 of that for queries. DB queries: 87. Memory Usage: 1,301kB