Hi,
Can u PLEASE HELP ME
If possible i would like a simple example of input and output in CGI ASAP
(txt file)
PLEASE HELP
Printable View
Hi,
Can u PLEASE HELP ME
If possible i would like a simple example of input and output in CGI ASAP
(txt file)
PLEASE HELP
Upload this perl script called input.cgi to your cgi-bin.Type this URL into a browser...Code:#!/usr/bin/perl
# The following assumes you have CGI.pm installed, comes with Perl
use CGI qw(:standard);
$strInput = param('Text1');
# Specify HTML/Text document
print "Content-type: text/html\n\n";
# Print HTML Header
print '<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>My Interesting Page</title></head><h1>';
# Output value obtained from browser
print "You typed \"$strInput\"";
print '</h1></html>';
If you want to use a simple HTML for to provide the input instead of the URL, just create a standaard form with a text box on it called Text1. The submit button would then POST the info to the script.Code:http://www.mydomain.com/cgi-bin/input.cgi?Text1=Hello%20World!