My situation is this: I want to create a single form for the registration of new members. But, when people fill out the form and press the enter button, I don't want the data to be submitted. Instead, when people press the enter button they should go to another text field until the entire form is filled and can be written into the database. I would like a solution which uses only PHP code, not Javascript.
Here is my code:
<form name="form1" method="post" action="saveregistre.php">
<table width="35%" border="1" align="center">
<tr>
<td colspan="3">Please fill the form bellow</td>
</tr>
<tr>
<td width="21%">first name</td>
<td width="2%">:</td>
<td width="77%"><label>
<input type="text" name="textfield" id="fname">
</label></td>
</tr>
<tr>
<td>last name</td>
<td>:</td>
<td><label>
<input type="text" name="textfield" id="lname">
</label></td>
</tr>
<tr>
<td>age</td>
<td>:</td>
<td><label>
<input type="text" name="textfield" id="age">
</label></td>
</tr>
<tr>
<td>date of birth</td>
<td>:</td>
<td><label>
<input type="text" name="textfield" id="dobirth">
</label></td>
</tr>
<tr>
<td>home town</td>
<td>:</td>
<td><input type="text" name="textfield2" id="htown"></td>
</tr>
<tr>
<td colspan="3"><label>
<input type="submit" name="button" id="button" value="Submit">
</label></td>
</tr>
</table>
</form>