rys
asked on
Dynamin Pages under Perl for Win32
Hi,
that's the first time I am trying to write a CGI. I want the user to enter some information and
then I would like to return him/her a response. I am developing the CGI in Perl for Win32. As
I understand it, in the HTML document I write the following:
<FORM METHOD="POST" ACTION="cgi-local\outtest. pl" TARGET="_parent">
<INPUT TYPE="TEXT" NAME="_search_string">
<INPUT TYPE="RESET" VALUE="Clear">
<INPUT TYPE="SUBMIT" VALUE="Search">
</FORM>
then, in the outtest.pl file I write:
print "Content-type: text/html","\n\n" ;
print"<html><head>";
print"<title>CGI Results</title></head><bod y>";
print"<h1>Hello, world.</h1>";
print"</body></html>";
There is no connection between the output of the CGI and the input of the user. I just want to
see if I am able to invoke the CGI from the HTML page.
When I run the ouuttest.pl file on its own it runs fine, but when I want to run it from the
browser (the HTML page) I do not know how
print the dynamic page to the user as an HTML page.
Any information/help would be greatly appreciated
Ronny Shalev
that's the first time I am trying to write a CGI. I want the user to enter some information and
then I would like to return him/her a response. I am developing the CGI in Perl for Win32. As
I understand it, in the HTML document I write the following:
<FORM METHOD="POST" ACTION="cgi-local\outtest.
<INPUT TYPE="TEXT" NAME="_search_string">
<INPUT TYPE="RESET" VALUE="Clear">
<INPUT TYPE="SUBMIT" VALUE="Search">
</FORM>
then, in the outtest.pl file I write:
print "Content-type: text/html","\n\n" ;
print"<html><head>";
print"<title>CGI Results</title></head><bod
print"<h1>Hello, world.</h1>";
print"</body></html>";
There is no connection between the output of the CGI and the input of the user. I just want to
see if I am able to invoke the CGI from the HTML page.
When I run the ouuttest.pl file on its own it runs fine, but when I want to run it from the
browser (the HTML page) I do not know how
print the dynamic page to the user as an HTML page.
Any information/help would be greatly appreciated
Ronny Shalev
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Make sure your script is in an executable directory. Website can change where that is. I assume yours can too.
Oh...I see one more problem. In PERL, the "\" is a special character. You have to tell PERL that its not special.. Here's what you have to write instead:
print "Content-type: text/html","\n\n";
print"<html><head>";
print"<title>CGI Results<\/title><\/head><b
print"<h1>Hello, world.<\/h1>";
print"<\/body><\/html>";
Give that a try...it should work MUCH better!!!
Tom Nunamaker
nunamakt@toshop.com