Gossamer Forum
Home : General : Internet Technologies :

Redirect & Form Submit in one?

Quote Reply
Redirect & Form Submit in one?
hi,

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

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

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

cheers!

regan.
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";

Unsure

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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:

http://foo.com/processForm.cgi?fName=Abraham&lName=Lincoln&Submit=1

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