|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Passing a Hyper Link in CGI
Hi,
I started with CGI and face a very basic problem... I have a .html in which Iam calling a .cgi file and after this if it enters the below If loop It needs to go to the next page but it is not happening.. use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser/; sleep(1); if(-s "test.pl") { <META HTTP-EQUIV="Refresh" CONTENT="3;url=http://localhost/~user/check.html"> } Missed something here, can anyone help me out.. Thanks |
|
#2
|
|||||
|
|||||
|
you might need to let it know that its html that you are using
try (inside your curly brackets) perl Code:
I imagine you can get rid of the body section, but you might want it to say something while its waiting to redirect. And i think the redirect statement needs to be in the head. |
|
#3
|
|||
|
|||
|
you need to print the HTML.
use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser/; sleep(1); if(-s "test.pl") { print qq{<META HTTP-EQUIV="Refresh" CONTENT="3;url=http://localhost/~user/check.html">} } |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Passing a Hyper Link in CGI |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|