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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Time Redirection

Status
Not open for further replies.

LookingBeyond99

Programmer
Jul 2, 2001
18
0
0
US
I wrote a small upload program. If an error occurs during the opload I want the program to print an error to the screen and then redirected back to form after 5 seconds. Meaning first it says "Sorry file too large" and then is redirected back to the original form.

I use this to redirect to the page but I want it to be delayed for 5 seconds with the screen displaying the Error message before redirecting.

print "Location:
The two problems that occur is that I don't know how to delay it before it redirects and if I try to write something to the screen then it won't redirect but instead it takes the print "Location line and simply just prints that to the screen as well.

If someone knows how to delay it before it redirect I'd be very thankful.
 
Code:
#!/usr/local/bin/perl
print "Content-type: text/html\n";
print "Refresh: 5; URL='[URL unfurl="true"]http://www.someurl.com'\n\n";[/URL]
print &quot;<HTML>\n&quot;;
print &quot;<HEAD>\n&quot;;
print &quot;<TITLE> </TITLE>\n&quot;;
print &quot;</HEAD>\n&quot;;
print &quot;<BODY> <p>refreshing in 5 seconds</p></body></html>&quot;;

HTH


keep the rudder amid ship and beware the odd typo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top