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

Posted by George B on 07/19/05 20:30

Paul Waring wrote:
> 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
>
well what kind more information do you want to know? I can provide you
with all the info.
By the way. Here is my table.

CREATE TABLE `b_users` (
`userID` bigint(21) NOT NULL auto_increment,
`username` varchar(60) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`status` int(20) NOT NULL default '0',
`posts` bigint(20) NOT NULL default '0',
`email` varchar(255) NOT NULL default '',
`validated` int(11) NOT NULL default '0',
`keynode` bigint(21) NOT NULL default '0',
`sig` tinytext NOT NULL,
`banned` varchar(255) NOT NULL default 'no',
`rank` varchar(255) NOT NULL default '0',
`usepm` int(11) NOT NULL default '1',
`AIM` varchar(50) NOT NULL default '',
`ICQ` varchar(50) NOT NULL default '',
`location` varchar(255) NOT NULL default '',
`showprofile` smallint(6) NOT NULL default '1',
`lastposttime` bigint(20) NOT NULL default '0',
`tsgone` bigint(20) NOT NULL default '0',
`oldtime` bigint(20) NOT NULL default '0',
`avatar` varchar(255) NOT NULL default '',
`photo` varchar(255) NOT NULL default '',
`rating` bigint(255) NOT NULL default '0',
`totalvotes` bigint(20) NOT NULL default '0',
`votedfor` longtext NOT NULL,
`rps` int(11) NOT NULL default '1',
`rpsscore` bigint(20) NOT NULL default '0',
`lasttime` bigint(20) NOT NULL default '0',
PRIMARY KEY (`userID`)
) TYPE=MyISAM AUTO_INCREMENT=6 ;

:)

 

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

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