How can I reset the initial form variables that are set with session
statements when clicking on a button?
I tried this but the function was not called:
<?PHP
function reset_form($non e) { $_SESSION = array(); }
?>
<form enctype="multip art/form-data" name="company_i nfo" method="post"
action="add_pic .php">
<input type="text" name="co_name" value ="<?PHP echo $_SESSION['co_name'];
?>" >
<input type="reset" value="Reset" onClick ="<?PHP reset_form();?> ">
</form>
statements when clicking on a button?
I tried this but the function was not called:
<?PHP
function reset_form($non e) { $_SESSION = array(); }
?>
<form enctype="multip art/form-data" name="company_i nfo" method="post"
action="add_pic .php">
<input type="text" name="co_name" value ="<?PHP echo $_SESSION['co_name'];
?>" >
<input type="reset" value="Reset" onClick ="<?PHP reset_form();?> ">
</form>
Comment