Hi,
I'm working on a script called explore.cgi and it uses lots of subroutine urls like explore.cgi?$email&$pass&mode=10. When the user click on a url "Church", it will go to explore.cgi?mode=10. Here's my half code:
if ($query =~m/10/) {
&town("Church Main Page"
;
exit(0);
}
sub town {
my ($message) = @_;
my ($title) = @_;
print <<EOF;
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>$title</title>
</head>
<p>$message</p>
#HTML CODES
EOF
}
But when I run the url explore.cgi?mode=10, it will displays "Church Main Page" but the title is the same. Meaning perl's thinks ($title) = @_ is same as ($message) = @_; and it displays the message instead of the title. How do I display title for each one?
I'm working on a script called explore.cgi and it uses lots of subroutine urls like explore.cgi?$email&$pass&mode=10. When the user click on a url "Church", it will go to explore.cgi?mode=10. Here's my half code:
if ($query =~m/10/) {
&town("Church Main Page"

exit(0);
}
sub town {
my ($message) = @_;
my ($title) = @_;
print <<EOF;
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>$title</title>
</head>
<p>$message</p>
#HTML CODES
EOF
}
But when I run the url explore.cgi?mode=10, it will displays "Church Main Page" but the title is the same. Meaning perl's thinks ($title) = @_ is same as ($message) = @_; and it displays the message instead of the title. How do I display title for each one?