echoing textfields and reset problem
In creating a registration form for users on my site, i decided to echo the details entered by the user, back into the field,so that if he pressed submit by mistake etc, the form would show what he has typed so far. I then have a reset button, which has a function that prompts the user - 'reset the form - yes/no'.
Whats weird is this.... because i am echoing the fields back on themselves, by using reset, it will not clear the form at all.
If i stop echoing the fields, the reset button works fine.
The code to echo the text fields, is shown below below, in this example for the 'email' field on the form
<?php echo @$email ?>
my reset button is as follows:
<form name="regform" form method='post' action='register_new.php' onreset="clearform(this)">
Does anybody know, how i can keep the form so that it echoes its contents back, but when i press reset, it clears the whole form?