id10error
03-19-2005, 10:18 PM
Hi:
I am going crazy here trying to figure out how to carry a variable from one page to the other. The first page, called
"return01.htm" has form properties with 1 hidden input text field called "sumthing". Upon clicking the submit button, open
a PERL page called "record01.cgi" and display the variable "sumthing". Can anyone help me with this please?
Here is the code for record01.cgi:
**************************************************************************************************** *****
#! /usr/bin/perl
print "Content-type: text/html", "\n\n";
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
print <<'EOF';
<html>
<head>
<title>Variable Carried-Over Page</title>
<link href="My-Text.css" type="text/css" rel="stylesheet">
<style>
<!--
.stdSmall {
COLOR: #962a2a
}
.stdSmall {
FONT-SIZE: x-small; FONT-FAMILY: verdana
}
.stdSmall {
FONT-SIZE: xx-small
}
-->
</style>
</head>
EOF
$ip=$ENV{'REMOTE_ADDR'};
print <<EOF;
<body background="Back01.jpg">
<table border="1" width="959" id="Table001" bordercolor="#FFFFFF" cellspacing="1">
<tr>
<td>
<div align="center">
<table border="1" width="812" id="Table002" bordercolor="#800000" cellspacing="0" cellpadding="0">
<tr>
<td width="56%" height="24"> </td>
</tr>
<td width="56%">
<table border="1" width="100%" id="Table003" bordercolor="#00FF00" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="98%">
<table border="1" width="100%" id="Table004" bordercolor="#FF0000" cellspacing="1">
<tr>
<td width="100%"> </td>
</tr>
<form name="Info01" method="post" action="/cgi-bin/nextpage.cgi">
<tr>
<td width="100%">
<table border="1" width="100%" id="Table005" bordercolor="#9999FF" cellspacing="1">
<tr>
<td width="100%" bgcolor="#333333"> </td>
</tr>
<tr>
<td width="100%" bgcolor="#333333">
<table border="1" width="100%" id="Table006" bordercolor="#0000FF" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="80%"><b><font size="2" face="Arial" color="#FFFF00">Information:</font></b></td>
<td width="19%"><input id="total5" type="text" size="18" name=$sumthing></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#333333">
<table border="1" width="100%" id="Table007" bordercolor="#0000FF" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="99%">
<span class="stdSmall"><font color="#FFFF00">The following variable was carried over from the previous page. This
page is in PERL and called return01.cgi under the correct directory.</font></span></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"> </td>
</tr>
</form>
</table>
</td>
<td width="1%"> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
EOF
I am going crazy here trying to figure out how to carry a variable from one page to the other. The first page, called
"return01.htm" has form properties with 1 hidden input text field called "sumthing". Upon clicking the submit button, open
a PERL page called "record01.cgi" and display the variable "sumthing". Can anyone help me with this please?
Here is the code for record01.cgi:
**************************************************************************************************** *****
#! /usr/bin/perl
print "Content-type: text/html", "\n\n";
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
print <<'EOF';
<html>
<head>
<title>Variable Carried-Over Page</title>
<link href="My-Text.css" type="text/css" rel="stylesheet">
<style>
<!--
.stdSmall {
COLOR: #962a2a
}
.stdSmall {
FONT-SIZE: x-small; FONT-FAMILY: verdana
}
.stdSmall {
FONT-SIZE: xx-small
}
-->
</style>
</head>
EOF
$ip=$ENV{'REMOTE_ADDR'};
print <<EOF;
<body background="Back01.jpg">
<table border="1" width="959" id="Table001" bordercolor="#FFFFFF" cellspacing="1">
<tr>
<td>
<div align="center">
<table border="1" width="812" id="Table002" bordercolor="#800000" cellspacing="0" cellpadding="0">
<tr>
<td width="56%" height="24"> </td>
</tr>
<td width="56%">
<table border="1" width="100%" id="Table003" bordercolor="#00FF00" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="98%">
<table border="1" width="100%" id="Table004" bordercolor="#FF0000" cellspacing="1">
<tr>
<td width="100%"> </td>
</tr>
<form name="Info01" method="post" action="/cgi-bin/nextpage.cgi">
<tr>
<td width="100%">
<table border="1" width="100%" id="Table005" bordercolor="#9999FF" cellspacing="1">
<tr>
<td width="100%" bgcolor="#333333"> </td>
</tr>
<tr>
<td width="100%" bgcolor="#333333">
<table border="1" width="100%" id="Table006" bordercolor="#0000FF" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="80%"><b><font size="2" face="Arial" color="#FFFF00">Information:</font></b></td>
<td width="19%"><input id="total5" type="text" size="18" name=$sumthing></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#333333">
<table border="1" width="100%" id="Table007" bordercolor="#0000FF" cellspacing="1">
<tr>
<td width="1%"> </td>
<td width="99%">
<span class="stdSmall"><font color="#FFFF00">The following variable was carried over from the previous page. This
page is in PERL and called return01.cgi under the correct directory.</font></span></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"> </td>
</tr>
</form>
</table>
</td>
<td width="1%"> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
EOF