coders4hire
IS-IT--Management
I've got the start on retrieving a querystring. I simply want to make a completion page where a status code is passed so that the text message can be adjusted.
Examples:
thanks.cgi?status=0
print "The service is currently unavailable"
thanks.cgi?status=1
print "The request was successful"
thanks.cgi?status=2
print "The request was unsuccessful"
I have no experience with perl, though. I've made the page, set CHMOD to 755 and I can get the status=0 back. I'm just having problems actually returning text for each status code. Here's what I have:
#------------- begin code ---------------------
#!/bin/perl
print "Content-type:text/html\n\n";
while (($key,$value)=each(%ENV))
{
print "<h3><I>$value</i></h3><br>"
if $key eq "QUERY_STRING";
}
#-------------- finish -------------------------
On a similar note, if I want to incorporate this message into an entire page, do I need to transform the contents of that page totally into 'print' commands in the Perl script? That seems a little inefficient.
Thanks!
Doug
Examples:
thanks.cgi?status=0
print "The service is currently unavailable"
thanks.cgi?status=1
print "The request was successful"
thanks.cgi?status=2
print "The request was unsuccessful"
I have no experience with perl, though. I've made the page, set CHMOD to 755 and I can get the status=0 back. I'm just having problems actually returning text for each status code. Here's what I have:
#------------- begin code ---------------------
#!/bin/perl
print "Content-type:text/html\n\n";
while (($key,$value)=each(%ENV))
{
print "<h3><I>$value</i></h3><br>"
if $key eq "QUERY_STRING";
}
#-------------- finish -------------------------
On a similar note, if I want to incorporate this message into an entire page, do I need to transform the contents of that page totally into 'print' commands in the Perl script? That seems a little inefficient.
Thanks!
Doug