Hi All..
While putting data into database from form if i refresh the php form a blank data will be added into database ... How can i remove that bug???
Here is my code....
While putting data into database from form if i refresh the php form a blank data will be added into database ... How can i remove that bug???
Here is my code....
Code:
<?php $con = mysql_connect("localhost","root","rootwdp"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("sample", $con); $sql="INSERT INTO usttable (usr_login,usr_password,usr_name,usr_email) VALUE ('$_POST[fname]','$_POST[password]','$_POST[fname]','$_POST[email]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } mysql_close($con) ?>
Comment