stop inserting data in the database when refreshing the page.
The best way to prevent that is to add header('Location: filename') after your query. Thus in your case,
if (isset($_POST['submit']))
{
$user= $_POST['username'];
$email = $_POST['useremail'];
$pass= $_POST['password'];
mysql_query("INSERT INTO table (username, useremail, email) VALUES ('$username','$useremail','$email');
//must be inside the condition to prevent too many redirects
header('Location: user_details_page.php');
}
Comments
Post a Comment