<?php
if(isset($_POST['Murad'])){header("localtion: http://localhost/murad/centil/o/Main.php");
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$userName=$_POST['username'];
$password=$_POST['pwd1'];
$email=$_POST['email'];
$mysql_hostname = "localhost";
$mysql_user = "root";
$mysql_password = "123";
$mysql_databse = "websiteusers";
$prefix = "";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
$sql = "INSERT INTO websiteusers
(fullname,lastname,userName,email,pass)
VALUES ( '$firstname', '$lastname','$userName', '$email','$password')";
mysql_select_db('websiteusers');
$retval = mysql_query( $sql );
if(! $retval )
{
die('Could not enter data: ' . mysql_error());
return false;
}echo "Entered data successfully
";
}
?>
There are no include in this file or there is no whitespace,so it is not showing any errors it also inserts data,but it stays on the same page
The header is incorrect, must say:
header("Location: http://localhost/murad/centil/o/Main.php");