Jump to content


Script Help

  • Please log in to reply
No replies to this topic

#1 Skyotica

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 26 August 2006 - 08:01 PM

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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users