Gossamer Forum
Home : General : Internet Technologies :

Redirect & Form Submit in one?

Quote Reply
Redirect & Form Submit in one?

can anyone tell me if it's possible to have a page that will automatically redirect you "and" submit a form to the page you're being redirected to?

if it is possible, can you tell me how?

I know the redirect is possible with a simple..

<meta http-equiv="refresh" content="0;url=http://www.thissite.com/">

but how to submit a form too I'm not exactly sure.


Quote Reply
Re: [ryel01] Redirect & Form Submit in one? In reply to
Huh? Why not send to a CGI script to get the data, and then use;

print "Location: http://www.yoursite.com/apge.htm \n\n";


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [ryel01] Redirect & Form Submit in one? In reply to
If I understand what you're asking, you could use a javascript solution. Just have all the form data as hidden inputs and then use:

<body onLoad="javascript:document.nameofform.submit();">

Or something to that effect...

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [adamuforestasan] Redirect & Form Submit in one? In reply to
I think he means on a site he does not "control". You need to look at the form structure and you generally should be able to pass the fields as post key/value pairs in the url.

For example, if the form on site http://presidents.com was calling /processForm.cgi in the form tag and had fields fName and lName, you could try calling it like:


With that said, any script I personally ever create that takes post arguments checks the referer, so you'd see the message:

Some fool at $ENV{REFERER} is calling my forms remotely!

Last edited by:

oldmoney: Jun 25, 2002, 5:13 AM