I have a database script that often reloads the same page after getting information. For example, it will gather information about a computer on a form, reload (using the submit button and $PHP_SELF) and I am able to enter that data in the data base by using $_REQUEST.
This works fine, but I want to do some error checking. For example if it finds a invalid IP address, I want it to check with the user to see if this is what they actually ment - but when I reload the page again to enter in the information into the database all data in my variables are lost.
I could use the URL to pass the variables, but it seems messy to do that when there is 15 variables. I also can create another form, and use hidden varibles to reassign values, for example:
<input type=hidden name="OS" value=<?php echo $OS ?>">
Then, use $OS = $_REQUEST['OS']; to have $OS be the correct value.
Isn't there anyway to just keep a variable between these page reloads? Or do I have to do it like this? Thanks for any help you can offer me, I've been looking everywhere for an answer to this, but haven't found much out.