Is there a standard way to fill text fields that are actually requesting data from the user?
See below
Page1
echo '<center><form action="add-engineer2.php" method="post" name="engineer">
<table>
<tbody>
<tr>
<td><b>Username:</b></td>
<td><input name="username" type="text"></td>
</tr>
<tr>
<td><b>Name:</b></td>
<td><input name="name" type="text"></td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><input name="password" type="password"></td>
</tr>
<tr>
<td><b>E-mail Address:</b></td>
<td><input name="email" type="text"></td>
</tr>
<tr>
<td><b>Site:</b></td>
<td><input name="site" type="text"></td>
</tr>
</tbody>
</table>
<p><input value="Next" type="submit" name="submit2">
</form>
Now I want to pre-fill these text fields with data when I send the user from another page like so.
mail($_POST['email'],$subject,$body,$headers) OR die("<center><p><font size='+3' color='red'><strong><u>ERROR!!</u></strong></font>
<p>
<font size ='+2' color='red'><strong>There was a problem with the e-mail address that you supplied for " . ucwords($_POST['name']) . "</strong></font>
<p>
Click the button below to fix the problem.
<p>
<form name='form-add-engineer' method='post' action='add-engineer.php'>
<input type='hidden' name='username' value='" . $_POST['username'] . "'>
<input type='hidden' name='name' value='" . $_POST['name'] . "'>
<input type='hidden' name='password' value='" . $_POST['password'] . "'>
<input type='hidden' name='email' value='" . $_POST['email'] . "'>
<input type='hidden' name='site' value='" . $_POST['site'] . "'>
<input name='edit-engineer' type='submit' value='Previous Page'>
</form>");
As you can see, I've used hidden $_POSTs in the ope that it would work but as the first page isn't populated by information from a previous page (because it's the first), this solution doesn't work.
Any suggestions?