clear form after submission

[php]


City

			<div class="info">
				<label class="lbl">Mob.</label>
				<input name="std_mob" type="text" class="txt_field" style="width:100;"  value="<?php echo $_POST['std_mob'];?>"/>
                <br/><label class="lbl">&nbsp;&nbsp;&nbsp;</label><span class="php_link">e.g. 1234-1234567</span>
			</div><!--info-->[/php]

After submision the form when i open the new form the fields show following type of code in the form fields

[php]
Notice: Undefined index: std_firstname in C:\xampp\htdocs\osems\school\admission.php on line 55
[/php]

i want to clear the form after data is enterd into db and data should stay on on the form unless all validations perform well and data is storeed in db plz help me its a bit urgent to me

advance thnks for any helping freind

You could hide the errors using @

[php]echo @$_POST[‘std_mob’];[/php]

OR check if the variable exists

[php]echo (isset($_POST[‘std_mob’]) ? $_POST[‘std_mob’] : ‘’);[/php]

thnks 2nd one is working

Sponsor our Newsletter | Privacy Policy | Terms of Service