I have a RedHat Linux 8.0 system. I have started the httpd (Apache
2.0.40) process and can now fetch pages from the server. I have a
test htlm page which has a form that will take a string and try to
send it back. The variable being passed in the form is not being
displayed by the php script. This must be so simple that I am just
overlooking something.
<html>
<body>
<form action="testech o.php" method="POST">
Enter String: <input type="text" instring="instr ing" />
<input type="submit">
</form>
</body>
</html>
---------- testecho.php code -----------------
<html>
<body>
string 1
<br>
<?php
$v1="string 2";
echo $v1;
?>
<BR>
<?php
$v1="string 3";
echo $v1; ?>
<br>
<?php
echo $_POST["instring"];
?>
</body>
</html>
----------- load the page and enter a string into form then submit
-----------
--------- the output of the returned html code is as follows
-----------
string 1
string 2
string 3
---------- the string I enter on the form is missing ---------
I do not understand why the variable from the form is not being
passed.
2.0.40) process and can now fetch pages from the server. I have a
test htlm page which has a form that will take a string and try to
send it back. The variable being passed in the form is not being
displayed by the php script. This must be so simple that I am just
overlooking something.
<html>
<body>
<form action="testech o.php" method="POST">
Enter String: <input type="text" instring="instr ing" />
<input type="submit">
</form>
</body>
</html>
---------- testecho.php code -----------------
<html>
<body>
string 1
<br>
<?php
$v1="string 2";
echo $v1;
?>
<BR>
<?php
$v1="string 3";
echo $v1; ?>
<br>
<?php
echo $_POST["instring"];
?>
</body>
</html>
----------- load the page and enter a string into form then submit
-----------
--------- the output of the returned html code is as follows
-----------
string 1
string 2
string 3
---------- the string I enter on the form is missing ---------
I do not understand why the variable from the form is not being
passed.
Comment