Hi guys, I'm creating a register page for my website. I have got things sorted now, when i try and test the page and try and register a user the data is not been inserted into the database
I'm not getting any error messages at all so I dont know what is going wrong
This is the connection code
<?php
mysql_connect ("localhost", "root", "");
mysql_select_db ("tut");
?>
This is the code
<!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 = "contrainer">
<?php
include('inc/header.php');
require('connection_db.php');
if(isset($_POST ['submit'])){
// Peform the berification of the nation
$email1 = $_POST['email1'];
$email2 = $_POST['email2'];
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
if($email1 == $email2) {
if($pass1 == $pass2) {
$name = mysql_escape_string($_POST['name']);
$lname = mysql_escape_string($_POST['lname']);
$uname = mysql_escape_string($_POST['uname']);
$email1 = mysql_escape_string($email1);
$email2 = mysql_escape_string($email2);
$pass1 = mysql_escape_string($pass1);
$pass2 = mysql_escape_string($pass2);
$pass1 = md5 ($pass1);
mysql_query("INSERT INTO 'users' ('id, 'name', 'lname'; 'email', 'pass',) VALUES (NULL, '@$name', '$lname', '$uname', '$email1', '$pass1',) ") or die(mysql_error());
}else{
echo "sorry, your passwords do not match. <br />";
exit();
}
}else{
echo "Sorry your email's do not match, please try again<br /><";
}
}else{
echo $form = <<<EOT
<form action='register.php' method="POST">
First Name: <input type="text" name="name" /><br />
Last Name: <input type="text" name="lname" /><br />
Username: <input type="text" name="uname" /><br />
Email: <input type="text" name="email1" /><br />
Confirm Email: <imput type="text" name="email2" /><br />
Password: <input type="password" name"pass1" /><br />
Confirm Password <input type="password" name="pass2" /><br />
<input type="submit" value="Register" name="Submit" /><br />
EOT;
//echo $form;
// the preceding line must have NO leading white-space of any kind
}
?>
<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>
Any help would be brilliant