Jump to content

Query String into Single Value?


objnoob

Recommended Posts

Greetings,

 

I'm looking for a way to pass a query string (from page1) as part of a query string (to page2) as a single key=>value pair. The idea is the use the query string to return the user to the previous page after the action has been completed.

 

query results[page1]->view record/action selection[page2]->back to results[page1]

 

I'm sure someone has been down this path before. P.S. the script is all contained within one file, thus the filename.ext is already known.

 

Thanks

 

 

Link to comment
Share on other sites

From one page to the next? like you click a link and go to the next page? Or you want it stored in general in a way you speak for all pages? Either way store it as an array in a session or cookie, if that dont work as a straight array try serializing and unserializing them and storing them in cookies/sessions..

Link to comment
Share on other sites

Instead of sending the referring queryString to the next page via URL, I just capture it using $_SERVER['HTTP_REFERER'] and parse out the queryString which I include in the form has a hidden input. Once the data is submitted for processing, if all is well I use the queryString to build landing page.

 

This way user goes from qualified list of records -> to edit record form -> back to list of records qualified in the same manner.

 

Less secure then my intent to manually pass the referring queryString via URL, but it works.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.