Jump to content

Archived

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

graciehz

Where should I look??

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Whoa! Why have you bumped a topic that was posted 6 months or so a go

Topic closed.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

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.