hello,
Im creating a registration page and i want to keep the user entered data after a generation of an error message.
form and the validations are in separate pages and validations belongs to a class.
html form
<form id="frmregister" name="frmregister" method="get" action="">
<tr>
<td><label>First Name </label></td>
<td colspan="2"><input name="txtfname" type="text" size="30" maxlength="20" value="<?php echo Handler:: $fname; ?>"/>*
</td></tr>
<--!more data--></tr><td width="113"><input class="button" type="submit" name="btnregister" value="Submit" /></td></tr>
</form></table>
All methods i used are static
this is the class that handles the submition
class Handler{
public static function register() {
if(isset($_GET['btnregister']))
{
$fname=trim($_GET['txtfname']);
//some more codes
}
}
as you see im trying to access $fname but it does not work. i think there is a better way to do this.. can anyone please give me an idea?