I'm trying to write a code and i get this error that my post isn't "defined" here some of my code:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel = "stylesheet">
Forgot password?
<div style="padding-top:30px" class="panel-body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form id="loginform" method = "post" action = "login.php" class="form-horizontal" role="form">
<div style="margin-bottom: 25px" class="input-group">
<input id="register-username" type="text" class="form-control" name="username" value="" placeholder="username or email">
</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="register-password" type="password" class="form-control" name="password" placeholder="password">
</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="register-confirm-password" type="password" class="form-control" name="password-confirm" placeholder="password">
</div>
<div class="input-group">
<div class="checkbox">
<label>
<input id="login-remember" type="checkbox" name="remember" value="1"> Remember me
</label>
</div>
</div>
<div style="margin-top:10px" class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<input type="submit" class="btn btn-info" value="Login">
<a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>
</div>
</div>
</form>
</div>
</div>
</div>
also my php code it says that i get on line 7,8,9 undefined index which is weird because the post seems correct. here is the following lines i can get error in
$username =htmlspecialchars($_POST["username"]);
$password =htmlspecialchars($_POST["password"]);
$confirm_password= htmlspecialchars($_POST["password-confirm"]);