form not clearing data fields
Posted: Sun Sep 13, 2009 4:45 am
Hello friends
i am working on php page. There are around 20 fields like....
<label>4. First Name</label>
<input type="text" name="fnam" size="10" value="<?php if (isset($_POST['submit'])) echo $_POST['fnam'];?>"><br><br>
<label>5. Basic Pay</label>
<input type="text" name="basic" value="<?php if (isset($_POST['submit'])) echo $_POST['basic'];?>">
</select> <br> <br>
when i click on submit button the data are inserting in the data base but after that also value remain in the textbox....the value should clear out whenever i click on submit or when i refresh......but its not happning.....please help me to solve this problem
thanks
i am working on php page. There are around 20 fields like....
<label>4. First Name</label>
<input type="text" name="fnam" size="10" value="<?php if (isset($_POST['submit'])) echo $_POST['fnam'];?>"><br><br>
<label>5. Basic Pay</label>
<input type="text" name="basic" value="<?php if (isset($_POST['submit'])) echo $_POST['basic'];?>">
</select> <br> <br>
when i click on submit button the data are inserting in the data base but after that also value remain in the textbox....the value should clear out whenever i click on submit or when i refresh......but its not happning.....please help me to solve this problem
thanks