I am using Twitter Bootstrap to build a web application. I have a form where user should enter his name and last name and click submit. The problem is, that the $_POST
comes back empty.
I am using WAMP on Windows 8 machine.
<?php
if(isset($_POST["send"])) {
print_r($_POST)
} else {
?>
<form class="form-horizontal" action="" method="post">
<div class="control-group"> <!-- Firstname -->
<label class="control-label" for="inputEmail">First name</label>
<div class="controls">
<input type="text" id="inputName" placeholder="First name">
</div>
</div>
<div class="control-group"> <!-- Lastname -->
<label class="control-label" for="inputEmail">last name</label>
<div class="controls">
<input type="text" id="inputLastname" placeholder="Last name">
</div>
</div>
<div class="form-actions">
<button type="submit" name="send" class="btn btn-primary">Submit data</button>
<a href="<?php $mywebpage->goback(); ?>" class="btn">Cancel</a>
</div>
</form>
<?php
}
?>
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…