can i go to a script-defined URL?

question: i have a script that defines a URL by inserting information (via variables) into a basic URL form:


currently all the script does is print the new url on a new there a way to make the script run, make the new url and then -go- to the new URL (without the user doing anything other than initiating the script)?

:) thanks in advance
Who is Participating?
jsatterlConnect With a Mentor Commented:
You have two choices...

Either use the Location tag read by
the browser, as in

print "Location: $url\n\n";

Do not print out the header/content type with this method.


Use the http redirect supported by most browsers these days, as in

print "Content-Type:  text/html\n\n";
print "<html><head>\n";
print "<meta http-equiv=\"refresh\" content=\"0; url=$redirect\">\n";
instead of print "Content-type: text\html/n/notherstuff";
just do print "Location:\n\n";
and then exit the script.
destyAuthor Commented:
yay! it works! thank you! :) :) :)
All Courses

From novice to tech pro — start learning today.