html - "Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\trial\register.php on line 104 -


it says:

parse error: syntax error, unexpected end of file in c:\xampp\htdocs\trial\register.php on line 104

when localhost/trial/register.php line 104 line html tag closes. don't know going on please help. i'm trying create registration page

    session_start();     //check if logged in     if (isset($_session['id'])){         header("location: index.php");     }      if (isset($_post['register'])){         include_once("db.php");          $username = strip_tags($_post['username']);         $password = strip_tags($_post['password']);         $password_confirm = strip_tags($_post['password_confirm']);         $email = strip_tags($_post['email']);          $username = stripslashes($username);         $password = stripslashes($password);         $password_confirm = stripslashes($password_confirm);         $email = stripslashes($email);          $username = mysqli_real_escape_string($db, $username);         $password = mysqli_real_escape_string($db, $password);         $password_confirm = mysqli_real_escape_string($db, $password_confirm);         $email = mysqli_real_escape_string($db, $email);          //encrypt password         $password = md5($password);         $password_confirm = md5($password_confirm);          //sql storage queries         $sql_store = "insert users (username, password, email) values ('$username','$password','$email')";         $sql_fetch_username = "select username users username='$username'";         $sql_fetch_email = "select email users email='$email'";         //setting queries         $query_username = mysqli_query($db, $sql_fetch_username);         $query_email = mysqli_query($db, $sql_fetch_email);          //check matches, incomplete entry, errors or email in use         if(mysqli_num_rows($query_username)){             echo"there user name!";             return;         }          if($username == ""){             echo"please enter username!";             return;         }          if($password == "" || $password_confirm==""){             echo"please enter password!";             return;         }           if($password !=$password_confirm){             echo"the passwords not match!";             return;         }           if (!filter_var($email, filter_validate_email) || $email ==""){             echo"this email not valid!";             return;         }          if (mysqli_num_rows($query_email)){             echo"that email in use!";             return;         }          mysqli_query($db, $sql_store);         header("location: index.php"); ?>    <!doctype html> <html>     <head>         <title>pq</title>         <link rel="stylesheet" type="text/css" href="style.css">         <script src="main.js"></script>     </head>      <body>         <div data-role="page" id="welcome">             <div data-role="header">                 <h1>welcome</h1>                                 </div>             <div role="main" id="loginform">                 <form method="post" action="register.php" enctype="multipart/form-data">                     <input name="username" placeholder="username" type="text">                     <input name="password" placeholder="password" type="password">                     <input name="password_confirm" placeholder="confirm password" type="password">                     <input name="email" placeholder="email address" type="text">                     <input name="register" type="submit" value="register">                 </form>              </div>             <div data-role="footer" data-position="fixed" data-theme="c">                 <h4>(c) 2016</h4>             </div>         </div>   </body>  </html> 

this error display last line only. because can close closing brackets in last line also. in case didn't close bracket of if(isset($_post['register'])) ali said.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo