I have a script that generates random data into an array then uses a while loop to display the data. I have a separate script that takes a row from that array and inserts it into a MySQL database. The problem I am having, is that every time the page refreshes the data changes. So instead of inserting the original row I wanted into the database, it inserts the refreshed row. I can post code if need be, but I am just looking for a way to:
a. Either keep the random script from generating automatically or, in intervals, on a particular event, etc.
b. Or, find a way to preserve those variables somehow so they don't refresh when the page is reloaded. Possibly store them in a session?
Any recommendations are appreciated.