I am trying to create a signup form but I am not being able to get the user email into the sql database.
Here's my HTML form code
<form class="form-login" action="register.php" method="POST">
<h2 class="form-login-heading">sign up now</h2>
<div class="login-wrap">
<input type="text" class="form-control" placeholder="First Name" name="first" autofocus>
<br>
<input type="text" class="form-control" placeholder="Last Name" name="last">
<br>
<input type="text" class="form-control" placeholder="Email" name="email">
<br>
<input type="text" class="form-control" placeholder="Username" name="username">
<br>
<input type="password" class="form-control" placeholder="Password" name="password">
<label class="checkbox">
<span class="pull-right">
<a href="resetpassword.html"> Forgot Password?</a>
</span>
</label>
<button class="btn btn-theme btn-block" type="submit"><i class="fa fa-lock"></i> SIGN UP</button>
<hr>
<div class="login-social-link centered">
<p>or you can sign in via your social network</p>
<button class="btn btn-facebook" type="submit"><i class="fa fa-facebook"></i> Facebook</button>
<button class="btn btn-twitter" type="submit"><i class="fa fa-twitter"></i> Twitter</button>
</div>
<div class="registration">
Don't have an account yet?<br/>
<a class="" href="#">
Create an account
</a>
</div>
</div>
<!-- Modal -->
<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Forgot Password ?</h4>
</div>
<div class="modal-body">
<p>Enter your e-mail address below to reset your password.</p>
<input type="text" name="email" placeholder="Email" autocomplete="off" class="form-control placeholder-no-fix">
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
<button class="btn btn-theme" type="button">Submit</button>
</div>
</div>
</div>
</div>
<!-- modal -->
</form>
here's the php code that I am using, the following php code is only able to insert the first name, last name, username, and password but Email is being left out. I tried the same php code on another form and that seemed to be working fine. Can someone explain where I am going wrong?
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];
$username = $_POST['username'];
$password = $_POST['password'];
the following is my sql code to insert data into the database the rest of the code that establishes the connection and everything seems to be working fine. So can someone tell me where I have gone wrong?
$sql = "INSERT INTO registeredusers (FirstName,LastName,UserName,Email,Password)
VALUES ('$first','$last','$username_lower','$email','$encryptedPWD')";
here's the sql
structure
CREATE TABLE 'registeredusers' (
'id' int(11) NOT NULL,
'FirstName' varchar(50) NOT NULL,
'LastName' varchar(50) NOT NULL,
'UserName' varchar(50) NOT NULL,
'Email' varchar(50) NOT NULL,
'Password' varchar(255) NOT NULL,
'ResetPassword' int(7) DEFAULT NULL,
'friends' int(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;