Why when "$password = md5($password)" is not commented out the insert query is unsuccessful?
if (isset($_POST['signupFootball'])) {
$firstname = mysqli_real_escape_string($con, $_POST['fname']);
$lastname = mysqli_real_escape_string($con, $_POST['lname']);
$email = mysqli_real_escape_string($con, $_POST['email']);
$password = $_POST['password'];
$password = md5($password);
if (mysqli_query($con,"INSERT into `users`(fname, lname, email, password) VALUES ('$firstname', '$lastname', '$email', '$password')")) {
echo "<h1><strong>successful connection</strong></h1>";
$_SESSION['fname'] = $firstname;
$_SESSION['success'] = 'You have been registered successfully';
header('location: signupcomplete.php');
}
else {
echo "<h1><strong>unsuccessful connection</strong></h1>";
echo "<a href=\"index.php\">Go back home</a>";
}
}