This is an extremely newbie question but I cannot figure out why this does not work. I have two forms one html that allows the user to enter a value in val1. The user submit and it goes to the second form calculate.php.
That form is supposed to display the value of the calculate_form.html. It does not, and I have tried about two thousand variations. I am stuck and apparently struck stupid. Any help would be greatly appreciated.
Here is the form and hence the problem. I checked other posts and found that the register_globals is set to on. I also see that the form method of php is set to GET. I tried that as well and although I could see the get results in the url I could not get it to display.
calculate_form.html
<HTML>
<HEAD>
<TITLE>New Page 1</TITLE>
</HEAD>
<BODY>
<FORM METHOD="POST" ACTION="calculate.php">
<P>Value 1: <INPUT TYPE="text" NAME="val1" SIZE=10></P>
<P><INPUT TYPE="submit" NAME="submit" VALUE="Calculate"></P>
</FORM>
</BODY>
</HTML>
----------------------------------------------------------
calcualte.php
<?php
$result=($_POST[val1]);
?>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php
echo $result;
?>
</BODY>
</HTML>
That form is supposed to display the value of the calculate_form.html. It does not, and I have tried about two thousand variations. I am stuck and apparently struck stupid. Any help would be greatly appreciated.
Here is the form and hence the problem. I checked other posts and found that the register_globals is set to on. I also see that the form method of php is set to GET. I tried that as well and although I could see the get results in the url I could not get it to display.
calculate_form.html
<HTML>
<HEAD>
<TITLE>New Page 1</TITLE>
</HEAD>
<BODY>
<FORM METHOD="POST" ACTION="calculate.php">
<P>Value 1: <INPUT TYPE="text" NAME="val1" SIZE=10></P>
<P><INPUT TYPE="submit" NAME="submit" VALUE="Calculate"></P>
</FORM>
</BODY>
</HTML>
----------------------------------------------------------
calcualte.php
<?php
$result=($_POST[val1]);
?>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php
echo $result;
?>
</BODY>
</HTML>