View Single Post
Old 06-29-2004, 01:11 PM   #2 (permalink)
sammy
Code Monkey
 
sammy's Avatar
 
Join Date: Jun 2004
Location: Brooklyn/Rochester
Posts: 53
sammy is on a distinguished road
Send a message via AIM to sammy
Thats strange...I tried to replicate your error and my data was not erased.
PHP Code:
<?
if( $HTTP_POST_VARS['summ'] == "submitted"){
        print 
"submitted";
        
$val $HTTP_POST_VARS['sammyz'];
}
?>
<form name="sammy" action="index.php" method="post">
<input type="text" value="<?echo $val?>"name="sammyz" size="20">
<input type="hidden" name="summ" value="submitted">
<input type="checkbox" name="chekbox">
<input type="submit">
</form>
<?
function printEr(){
        print(
"
        <script type='text/javascript' language='javascript'>
        <!--
        alert('Error');
        //-->
        </script>
        "
);
}
if( 
$HTTP_POST_VARS['chekbox'] ){
        
printEr();
}

?>
please forgive the messy coding, i just wanted to test how the data could have been erased.
basically i have a form that if the check box is checked, it will alert and simulate an error, then populate the form with the users data. When i press OK, the data remains
__________________
sammy is offline   Reply With Quote