Hi, i am making 3 forms, let's say, form1, form2, form3.
In form1, there is a field "givenname" and a submit button that link to form2, and i want to pass this field to form2, i can pass this without any difficulty.
However, i also want to pass the field from form1 to form3.
And i cannot get the value from form1 to form 3.
Can anyone help?
here's the code:
form1.php:
<form name="myform" action="form2.php" method="post">
<table>
<tr><td>Given Name</td><td><input type="text" name="given name" id="given name"></td></tr>
</table>
<table>
<tr><td><input type="submit" name="submit" value="submits"></td></tr>
</table>
</form>
form2.php:
<form name="myform" action="form3.php" method="post">
<table>
<tr><td>Test</td></tr>
<tr><td>
<?php
$givenname = $_REQUEST['given_name'];
if($givenname!="" ) {
echo("Given Name: " .$givenname ."<br>");
}
?>
</td></tr>
</table>
<table>
<tr><td><input type="submit" name="submit" value="submit"></td></tr>
</table>
</form>
form3.php:
<form name="myform" method="post">
<table>
<tr><td>Last Form</td></tr>
<tr><td>
<?php
$givenname = $_REQUEST['given_name'];
if($givenname!="" ) {
echo("Given Name: " .$givenname ."<br>");
}
?>
</td></tr>
</table>
</form>
The PHP code in form3.php can not work.
Can anyone help?
thanks