You are here: Re: [PHP] My Project « PHP « IT news, forums, messages
Re: [PHP] My Project

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация