Original Post
Hey everybody. I'm dabbling in web-game creation for the first time. I've been able to figure most stuff out but this, I can't. I have a file, 'main.php' which displays many links designed to run a PHP function. They do this by sending variables in the link, ie 'www..../main.php?screen=1'. Now this is a two part question, Firstly, because I reload the PHP file everytime a link is clicked, I don't want to define the global variable at the beginning, I just want to DECLARE it so that it retains whatever value it had before the reload. Make sense? I've tried 'global $variable;' and strange things like '$variable = $variable;'. I want it to know the variable exists, without resetting its value. Secondly, would it reset the variable anyway when I reload the file. Thankyou very much, help is greatly appreciated.