Parse error: syntax error, unexpected ';' on line 11, i am trying to locate my mistake, but no success. As i followed tutorial, and code is 1/1 as video, i don't understand what is wrong.I'm at PHP beginner level , so can anyone help to fix this ?
<?php
if (isset($_POST['submit'])) {
include_once 'dbh.inc.php';
$first = mysql_real_escape_string($conn, $_POST['first']);
$mail = mysql_real_es1cape_string($conn, $_POST['mail']);
$pwd = mysql_real_escape_string($conn, $_POST['pwd']);
if (empty($first)||(empty($mail)||(empty($pwd)) {
header("Location: signup.php?signup=empty");
exit();
}
else {
if (!preg_match("/^[a-zA-Z]*$/", $first)){
header("Location: ../index.html?signup=invalid");
exit();
} else {
if (filter_var($mail, FILTER_VALIDATE_EMAIL)){
header("Location: ../index.html?signup=empty");
exit();
} else {
$sql = "SELECT * FROM users WHERE users_mail='$mail'";
$result = mysql_query($conn, $sql);
$resultCheck = mysql_num_rows($results);
if($resultCheck > 0) {
header("Location: ../index.html?signup=emailalredyinuse");
exit();
} else {
$hashedPWD = pasword_hash($pwd, PASWORD_DEFAULT);
$sql = "INSERT INTO users (user_first, user_mail, User_pwd) VALUES ('$first', '$mail', '$hashedPWD');";
$result = mysql_query($conn, $sql);
header("Location: ../index.html?signup=succsess");
exit();
}
}
}
}
} else {
header("Location: ../index.html");
exit();
}