|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Hi Guys
Anybody any ideas how I can pass post data to another page using only header : location? I have a script that presents the user with a form. They fill in the details and submit the form. The form action calls the same script, validates the data and then shows the form again if any fields were invalid, all other fields being populated with valid data as received in the post. Once all fields are valid, instead of displaying the form I want to redirect to another URL but I need to keep the post data intact so that it is available to the next script? In other words, I want the second script to think it’s receiving the post data from a form, without having to get the user to click on another submit button. All comments welocome. Cheers Baines |
|
#2
|
||||
|
||||
|
You can't pass post information, unless I'm mistaken..not that I'm aware of anyway.. you could set session values, or you could pass them as get values through the url...
|
|
#3
|
|||
|
|||
|
Thanks for this Justin
I can’t use GET as the receiving CGI script is part of a software registration process that I have no control over ![]() Thought there might be a way to build a header string that was formatted to look like POST data but it looks like I’m wrong, not for the first time Guess I’ll just have to come up with another answer. Thanks again Baines |
|
#4
|
||||
|
||||
|
Yeah, sorry about that
I had a similar problem where I was going to be sending information to a CGI script for email registration, so instead I decided to write my own.. and I used a shell script to pass some of the information <after it was verified to not be malicious> and had that add the people to the dbGood luck with you.. if you find anything out where you can figure something out to do what you want to be doing, PM me with it would you? I'd love to see it. |
|
#5
|
|||
|
|||
|
Hi Justin
I decided to turn it in to a two stage process, Step 1, enter your details, Step 2 check your details and click “Request Key” The second submit button then passes the form data to the CGI script in the normal way. It’s not ideal but it does allow me to validate the data before sending it to the second server. If I come up with anything better I’ll be sure to let you know. Thanks for the input Baines |
|
#6
|
||||
|
||||
|
That sounds like it could work.. Kind of like a validation page, right? "Thanks for joining! You are now a member of the mailing list/database/whatever.. Now request a key if you want to access the other areas of the site" or something like that right?
That way you could add them to the database <if you're using one> or whatever.. sounds good.. again let me know what you find.. you may need to end up building your own custom CGI for it, possibly.. what is this for, anyway? |
|
#7
|
|||
|
|||
|
It’s a software registration system. I do some work for a company who manufacture handheld GPS equipment and they are about to launch a new product. The mapping software is written by another company and requires a registration key before it can be used.
During installation, the software goes on-line and calls one of my scripts that captures name, address, country etc. The software also passes its serial number. The user name and serial number are then sent to the software company who generate the registration key with their own CGI script. All this is then comes back to one of my scripts and I store the details in a database and display the registration key to the user who then enters it in to there application…. Everything is working quite well but I’m a bit of a stickler when it comes to additional mouse clicks! I would have liked to be able to collect, validate and submit the data with just one script. The only other way I can think of doing it would be with some Javascript to do the validation (maybe with an OnSubmit function) but as I know less than zero about Java, I wouldn’t know where to start. Anyone else got any ideas? Regards Baines |
|
#8
|
|||
|
|||
|
Just to add to this thread (sorry for being late) - but there is a way you could have done this with a request to preserve the post data, and thats by using fsockopen().
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#9
|
|||
|
|||
|
Hi Joe
Thanks for this, it is the answer I was looking for and as soon as I get a few moments I’ll work out the details. Thanks again for your input. Cheers Baines |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Preserve Post Data for header: Location? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|