- Step 1 is the studdent information;
- Step 2 is the parent information.
The way I'm doing this is by using the same php file "addstuddent.php" and what I have is something like this:
1st: When I press "Add Studdent" on the previous page I will be redirected for "addstuddent.php?step=1"
2nd: When I press the submit button "Next" I want to check for errors on the fields and if everything is fine it redirects to "addstuddent.php?step=2"
the code is:
Code: Select all
if($_REQUEST['step'] == 1)
<form action="addstuddent.php?step=1" method="POST">
<input type="text" name="fullname">
<input type="text" name="birthday">
<input type="text" name="address">
<input type="submit" value="Next" name="next">
if($_REQUEST['fullname'] != NULL && $_REQUEST['birthday'] != NULL && $_REQUEST['address'] != NULL))
if($_REQUEST['step'] == 2)
echo $_REQUEST['fullname']; //__this won't work and I know it doesn't
I will get this error Notice: Undefined index fullname
Could someone help me and tell me how could I make it work? to send the variables from that form to the step 2 ?