General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old February 21st, 2003, 03:31 PM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 6
Question Preserve Post Data for header: Location?

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

Reply With Quote
  #2  
Old February 22nd, 2003, 09:13 AM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
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...

Reply With Quote
  #3  
Old February 24th, 2003, 05:10 AM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 6
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

Reply With Quote
  #4  
Old February 24th, 2003, 07:20 AM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
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 db

Good 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.

Reply With Quote
  #5  
Old February 24th, 2003, 07:28 AM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 6
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

Reply With Quote
  #6  
Old February 24th, 2003, 08:37 AM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
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?

Reply With Quote
  #7  
Old February 24th, 2003, 10:07 AM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 6
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

Reply With Quote
  #8  
Old February 25th, 2003, 12:57 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
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.




Reply With Quote
  #9  
Old February 25th, 2003, 06:52 PM
baines baines is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 33 baines User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 51 sec
Reputation Power: 6
Thumbs up

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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Preserve Post Data for header: Location?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway