I am getting an error about my if statement on line 16?
<?php
require_once 'dbConnect.php';
require_once 'functions.php';
$error = '';
if ($_POST['logIn'] == 1) { //if the form has been submitted
$userName = $_POST['user'];
$pass = $_POST['pass'];
$query = "SELECT * FROM users WHERE user_name='$userName' AND user_pass='$pass'";
$result = mysql_query($query) or die("connection error.")
if (empty($userName) || empty($pass)) { //are any of the fields empty
$error = "All fields must be filled out.";}
elseif (mysql_num_rows($result) != 1) { //if the username and password combo are not valid
$error = "Invalid username, password combo.";}
else { //log in was successful
$_SESSION['userName'] = $userName;
$_SESSION['loggedIn'] = 1;
echo "Welcome ".$userName." you're logged in.";
header("Location: http://www.thinksnack.com");
}
}
showLogInForm($error);
?>