Jump to content


This topic is now archived and is closed to further replies.


quick question :)

Recommended Posts

alright im making this simple shop type deal but i need a lil help.

Objective: I want users to buy items and i can set a ammount of number items in stock. Now Say i make a system where users can click on a item and it subtracts the number of items from the usershop.(heres the question) Instead of adding to the ammount giving how can i subtract from it?

Well could i do this(assume i connected to database etc..):

$blah = mysql_fetch_array($my_array_idefined);
$bam = $blah['points']-1;
mysql_query("UPDATE upoints SET points='$bam' where id='1' ");

would that work? anybody got an idea of where im going with this? Thanks in advanced

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.