Jump to content

Script Help


Skyotica

Recommended Posts

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.

Thanks,
~Skyotica
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.