Looking for some help. I'm trying to create my login in page for an app I'm creating at work and using Bootstrap to style.
The issue is that I cannot get my form to submit. While debugging, I have found that adding the Bootstrap btn class stops the form from submitting. If i remove it, everything works as should.
Below is a before and after.
WORKING:
<div class="row">
<div class="col-lg-12 text-center">
<h1>Asset Performance Tool</h1>
<p class="lead">Defining new ways to improve!!</p>
<ul class="list-unstyled">
<li>Bootstrap v3.3.7</li>
<li>jQuery v1.11.1</li>
</ul>
<br><br>
<a href="" class="btn btn-lg btn-default btn-block login" onclick="">Login</a>
<!-- Login -->
<div class="container" style="display: none;">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Please Sign In</h3>
</div>
<div class="panel-body">
<form method="post" action="">
<div class="form-group">
<input class="form-control" placeholder="E-mail" name="email" type="email" autofocus>
</div>
<div class="form-group">
<input class="form-control" placeholder="Password" name="password" type="password" value="">
</div>
<div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
</label>
</div>
<div class="submit">
<button type="submit" class="btn-primary" name="submit">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
NOT WORKING:
<div class="row">
<div class="col-lg-12 text-center">
<h1>Asset Performance Tool</h1>
<p class="lead">Defining new ways to improve!!</p>
<ul class="list-unstyled">
<li>Bootstrap v3.3.7</li>
<li>jQuery v1.11.1</li>
</ul>
<br><br>
<a href="" class="btn btn-lg btn-default btn-block login" onclick="">Login</a>
<!-- Login -->
<div class="container" style="display: none;">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Please Sign In</h3>
</div>
<div class="panel-body">
<form method="post" action="">
<div class="form-group">
<input class="form-control" placeholder="E-mail" name="email" type="email" autofocus>
</div>
<div class="form-group">
<input class="form-control" placeholder="Password" name="password" type="password" value="">
</div>
<div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
</label>
</div>
<div class="submit">
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
PHP-CODE:
<?php
include 'php-scripts/UserLogin.php';
if (isset($_POST['submit']))
{
$userSession = new UserLogin();
}
?>
I'm struggling to see the issue here, and wondering if any of you could help or may have seen something similar.