Re: My Project

From: Date: Tue, 19 Jul 2005 17:02:22 +0000
Subject: Re: My Project
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-218981@lists.php.net to get a copy of this message
On Tue, Jul 19, 2005 at 09:50:06AM -0700, George B wrote: > My money is being stored in a database. And I want everythign to be in > PHP, no java script. And the BUY!! Button is a input button from a form. :) Well in that case you probably want something like this (after you've checked to see whether the user is logged in etc): $sql = "UPDATE users SET money = money - 10 WHERE id = " . $_SESSION['user_id']; assuming of course that you have a table called users where the money for each one is stored and you're keeping the user_id in the $_SESSION superglobal. It's a bit difficult to help further without a bit more information. :) Paul -- Rogue Tory http://www.roguetory.org.uk

« previous php.general (#218981) next »