|
Posted by Paul Waring on 07/19/05 20:02
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
Navigation:
[Reply to this message]
|