Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic page loading??? 1

Status
Not open for further replies.

shamrox

Programmer
Sep 27, 2001
81
0
0
US
I need some help with the line of code to use to make an html page I created to open automatically after a form is submitted. I have a cgi script right now, that automatically creates one of those "thank you for submitting" pages, and I tried replacing that html with the html from the page I made. That didn't work. So, is there a line of code that I'd put after the "Print" function, that would point it to a new page, like samplepage.html ???
Hope I haven't been to confusing.

Bill
 
Please take a look at the FAQs for this forum. If you still have questions, please come back and post them. If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
GoBoating:
Ok, FAQ was fine. I understand all that. But what I want to happen after submitting the form, instead of it creating a results page with the info that was submitted, I just want the user to be directed to a new page, like the index.htm page for the site. They don't need to see what they just submitted on the form, I want them to be taken back to another page in the website. I'm sure this is a simple one liner in the cgi script code.
From your bio (experience), I'm sure you'll be able to easily answer this.
Thanks for your help.

 
The following will produce a redirect header. You can find more on it using

>perldoc CGI <return>

and search for 'redirect'

[/code]
#!/usr/local/bin/perl
use CGI;
my $cgi = new CGI;
# record the submitted information or what ever you need.
print $cgi->redirect(-uri=>' -nph=>0);

Code:
' Hope This Helps If you are new to Tek-Tips, please use descriptive titles, check the FAQs, 
and beware the evil typo.
 
Sometimes the object-oriented libraries are WAY more trouble than they're worth. Here's the EASY way to generate a redirect header:
Code:
print &quot;Location: [URL unfurl="true"]http://www.somewhere.com/path/page.html\n\n&quot;;[/URL]
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top