![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| "DUC" <dulum@eisa.net.au> wrote in message news:3f1487ae$1@news.comindico.com.au > Hi All, > > I want to redirect a page using the Location: header, and at the same > time, pass any $_POST'ed data to that page. > > Does anyone know of a way? > > Thank You, > DUC Do you mean pass the data back to the page on which the form exists (which takes the data from the user) or to pass the data to a new page using the Location:header method? If you want the former, simply make a self submitting form, a hidden field could be used to detect the form has been submitted, so the new section of html could be outputted rather than the form itself. If its the latter you have a few options. The first is by attaching the variables to the Header:location url as using the GET method i.e. location.php?var1=$var1&var=$var2. If you don't want your address to contain the variable data, the other method is by invoking a session for the duration of calling the new page. once the new page is loaded, pull the data from the session and if its no longer needed, simply destroy it. | |||
| | #2 | ||
| I think the solution with the session vars is the better and the safest. Sergiu. "^MisterJingo^" <misterjingo@keysurf.net> wrote in message news:<od0Ra.1275$Fz2.667@news-binary.blueyonder.co.uk>... > "DUC" <dulum@eisa.net.au> wrote in message > news:3f1487ae$1@news.comindico.com.au > > Hi All, > > > > I want to redirect a page using the Location: header, and at the same > > time, pass any $_POST'ed data to that page. > > > > Does anyone know of a way? > > > > Thank You, > > DUC > > Do you mean pass the data back to the page on which the form exists (which > takes the data from the user) or to pass the data to a new page using the > Location:header method? > > If you want the former, simply make a self submitting form, a hidden field > could be used to detect the form has been submitted, so the new section of > html could be outputted rather than the form itself. If its the latter you > have a few options. The first is by attaching the variables to the > Header:location url as using the GET method i.e. > location.php?var1=$var1&var=$var2. If you don't want your address to contain > the variable data, the other method is by invoking a session for the > duration of calling the new page. once the new page is loaded, pull the data > from the session and if its no longer needed, simply destroy it. | |||
| Featured Websites | ||||
|
![]() |
| Tags: data, location, passing, post |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing information to PHPBB? | joebeta | PHP | 2 | 10-08-2008 4:42 PM |
| Please help - Cracking elevation data format in data file | Kevin Fishburne | Software Programming | 10 | 06-12-2007 11:31 PM |
| map and location data for mallorca / baleares / spain | Horst Bahr | GPS | 0 | 06-12-2007 5:14 PM |
| Passing table name as argument to a stored procedure | robocop | Database | 0 | 06-10-2007 12:19 AM |
| Network sharing and by-passing the public only | Don | Windows | 0 | 05-29-2007 12:49 AM |
| Featured Websites | ||||
|