Hello , Im programming a random event script and am running into some problems with my logic.
The script will allow administrators to add random events to the site with choosing an option on what it does, how much it gives for what it does, and the chance of getting the event.
I was going to use a field in the database to hold the query command.
$points is the number of points to give the user from the event.
I want it to update for the person viewing the page, and this posts a problem because $YourName is a variable stored for the person logged in from the global file.
$query123 = "UPDATE `user` SET `point`=`point`+'$points' WHERE `username`='$YourName'"
This would cause it to always give it to the admin who added the script versus the actual person viewing it.
Any suggestions on how to fix this or another method?
If you would like to see more of the code just ask.
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users