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="">
<td><label>First Name </label></td>
<td colspan="2"><input name="txtfname" type="text" size="30" maxlength="20" value="<?php echo Handler:: $fname; ?>"/>*
<--!more data--></tr><td width="113"><input class="button" type="submit" name="btnregister" value="Submit" /></td></tr>

All methods i used are static
this is the class that handles the submition

class Handler{
	public static function register()	{
                        //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?

Edited by Virangya: n/a

7 Years
Discussion Span
Last Post by Virangya

Yeah.. thanx... by the way.. now that i have solved it.. my "reset" button is inactive.. since the sessions will remain till being destroyed. i can use a "submit" type button and call session_destroy() to achieve it, but. i want to do something different, keeping the “reset” type button. can i do something with javascript? or is there any other way???

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.