I'm trying to insert content from my form into my database. I'm using twitter bootstrap 3 to layout my website but here is the form;
<form class="form-horizontal" method="post" action="assets/mailreview.php" role="form">
<fieldset>
<!-- Form Name -->
<legend>Submit you're review</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="firstname">First Name:</label>
<div class="col-md-4">
<input id="firstname" name="firstname" placeholder="" class="form-control input-md" type="text">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="surname">Last Name:</label>
<div class="col-md-4">
<input id="surname" name="surname" placeholder="" class="form-control input-md" type="text">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="email">Email:</label>
<div class="col-md-4">
<input id="email" name="email" placeholder="" class="form-control input-md" type="text">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="title">Job Title:</label>
<div class="col-md-4">
<input id="title" name="title" placeholder="New kitchen.." class="form-control input-md" type="text">
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label" for="brief">Description:</label>
<div class="col-md-4">
<textarea class="form-control" id="brief" name="brief">please type you're review here</textarea>
</div>
</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="submitbtn">Submit:</label>
<div class="col-md-4">
<button id="submitbtn" name="submitbtn" class="btn btn-primary">Submit</button>
</div>
</div>
</fieldset>
</form>
As you can see I have set the submit action to respond to mailreview.php on doing so I receive no errors(after several and i mean several) however the form properties will not display in myphpadmin. It does insert a new row but not the field content.
here is mailreview.php
<?php
include_once("config.php");
$sql = "INSERT INTO review (firstname, lastname, email, title, brief) values(:firstname,:lastname,:email,:title,:brief)";
$stmt = $db->prepare($sql);
$stmt->bindParam(':firstname', $_POST['firstname'], PDO::PARAM_STR);
$stmt->bindParam(':lastname', $_POST['surname'], PDO::PARAM_STR);
$stmt->bindParam(':email', $_POST['email'], PDO::PARAM_STR);
$stmt->bindParam(':title', $_POST['title'], PDO::PARAM_STR);
$stmt->bindParam(':brief', $_POST['brief'], PDO::PARAM_STR);
$stmt->execute();
?>
any advice or support would be very grateful!!!