graciehz Posted June 21, 2006 Share Posted June 21, 2006 I'm currently putting together a virtual pet site. I need my users to collect gold as the browse thru the pages on the site. Example: User clicks on Games. 10 Gold is automatically added to their account. I'm not sure where I should start to look in putting in something extra like that into the script. I see that my global.inc.php shows this refering to getting the users current points in the database:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]$username = $getInfo[username];$display_name = $getInfo[display_name];$userid = $getInfo[id];$points = $getInfo[points];$rank = $getInfo[rank];$hungerLevel = $getInfo[hunger_level];if (!$username) { $username = "<i>Not logged in.</i>"; }if (!$display_name) { $display_name = "<i>Not logged in.</i>"; }if (!$points) { $points = "0"; }[/quote]I'm sort of thinking it can be done in one of these scripts that I have or maybe their should be a seperate script telling points to be added upon every click by the user??? I'm sort of lost. Could someone help me out. Link to comment https://forums.phpfreaks.com/topic/12580-where-should-i-look/ Share on other sites More sharing options...
Renlok Posted February 2, 2007 Share Posted February 2, 2007 that all looked really unnessasary all you need is to check the loggin cookie is set with valid data then update the users table with +10 gold/points we you call it Link to comment https://forums.phpfreaks.com/topic/12580-where-should-i-look/#findComment-175323 Share on other sites More sharing options...
wildteen88 Posted February 2, 2007 Share Posted February 2, 2007 Whoa! Why have you bumped a topic that was posted 6 months or so a goTopic closed. Link to comment https://forums.phpfreaks.com/topic/12580-where-should-i-look/#findComment-175568 Share on other sites More sharing options...
Recommended Posts