Jump to content


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


Script Help

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.


Share this post

Link to post
Share on other sites


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.