Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this question//register users
$username= mysqli_real_escape_string($db, $_POST['username']);
$email= mysqli_real_escape_string($db, $_POST['email']);
$password1= mysqli_real_escape_string($db, $_POST['password1']);
$password2= mysqli_real_escape_string($db, $_POST['password2']);
//form validation
if(empty($username)){array_push($errors, "Username is required")};
if(empty($email)) {array_push($errors, "Email is required")};
if(empty($password)) {array_push($errors, "Password is required")};
Closed. This question is off-topic. It is not currently accepting answers.
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this question//register users
$username= mysqli_real_escape_string($db, $_POST['username']);
$email= mysqli_real_escape_string($db, $_POST['email']);
$password1= mysqli_real_escape_string($db, $_POST['password1']);
$password2= mysqli_real_escape_string($db, $_POST['password2']);
//form validation
if(empty($username)){array_push($errors, "Username is required")};
if(empty($email)) {array_push($errors, "Email is required")};
if(empty($password)) {array_push($errors, "Password is required")};
The semi-colons need to go inside the curly braces, to mark the ends of the array_push() statements:
if(empty($username)) { array_push($errors, "Username is required"); }
if(empty($email)) { array_push($errors, "Email is required"); }
if(empty($password)) { array_push($errors, "Password is required"); }
You don't need semi-colons after the close braces.