Jump to content

An Easy Way To Port Info Between Pages?


mmcspadden
 Share

Recommended Posts

I recently wrote my own little webapp from scratch. I use php to create a random number which is used for a temp folder name to store the files in. I also use php to create a name for the resulting zip file using the date. Both of these are created after submitting the first page which creates the batch file. Both the random number and the filename are used in the batch file. The second page just lets them know if the batch was created without errors, and when they submit the second page it runs the batch script on the server and brings you to the third page where it gives you a link to your file. The two names are created on the first page, and used on both the second and third pages. I am currently using html text boxes and functions to port the info from one page to the next.Now that you have the background, what i would like to know is if there is a more elegant way in PHP to bring the info along without having it in the html code and without using cookies.

Link to comment
Share on other sites

Umm, temporary database entries?The most common and easiest way is to use sessions. However, initiating a session creates a small cookie that stores the user's session ID (SID), which is deleted when they close their browser. If cookies are disabled on the client, the SID is passed another way, e.g. through the querystring.Why don't you want to use cookies?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...