Hi guys, creating a log in script so my users can login to my website.
This is the code so far
<!DOCTYPE html>
<html>
<head>
<title>Richard Hemmings </title>
<meta name="viewpoint" content="width=device-width, intail-scale=1.0">
<link href = "css/bootstrap.min.css"rel = "stylesheet">
<link href = "css/stylesheet.css" rel = "stlesheet">
</head>
<body>
<div class = "navbar navbar-inverse navbar-static-top">
<div class = "container">
<div class = "navbar navbar-default navbar-fixed-bottom">
<div class = "container">
<P class = "navbar-text">Site build and belongs to Richard Hemmings (C) 2015</P>
</div>
</div>
<script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script><script src = "js/bootstrap/js" ></script>
</body>
</html>
<?php
include('inc/header.php');
require('connection_db.php');
if (isset($_POST['submit'])){
$uname = mysql_escape_string($_POST['uname']);
$pass = mysql_escape_string ($_POST['pass']);
$pass = md5 ($pass) ;
$uname = mysql_query("SELECT * FROM `users` WHERE `uname` = '$uname' AND `pass` = '$pass'");
if(mysql_num_rows($sql) > 0 {
echo "you are now logged in successfully!";
exit ();
}else{
echo "Wrong Username and password entered please try again";
}
}else{
echo $form = <<<EOT
<form action"login.php" method="POST">
Username: <input type="text" name ="uname" /><br />
password: <input type="password" name="pass" /><br />
<input type="submit" name="submit" value="Log in" />
</form>
EOT;
}
?>
This is the error message that I'm getting at the moment
Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\login.php on line 37
Any help would be brilliant sorry again for been a apain