Original Post
okay guys, ive got another problem. im making a text-based mmorpg and i have a page where users can buy 'fans' for a certain amount of money. here is the script for the form:
session_start();
?>
buy fans And here is the script to update the data in my database: =$total) { $getfans="UPDATE userstats SET money=money-'$total', fans=fans+'$fanswanted', WHERE userid='$userstatsall3[userid]'"; mysql_query($getfans) or die("Could not buy fans"); print "You bought $fanswanted fans. ."; } else { print "there was an error"; } } } else { print "Sorry, not logged in."; } print "test" ?> I get no error messages, but nothing comes up execpt for the user id, which i put to see if it worked and the "test". The data does not get updated in the database. Can anyone see what is wrong? thanks for your help. ps: Part of the script is copied from www.chipmunk-scripts.com's "Kill Monster" open-source game. [Edited by - bigfooot on October 22, 2005 9:56:50 PM]