please check screen shot.... for error
<div>
<?php
require_once("sendcontact.php");
$obj = new insertcontact();
$result = $obj->recordcontact();
?>
<?echo "<center>".$result."</center><br><br>"; ?>
<form action="" method="post">
<table>
<th><center> Please fill the form : </center></th>
<tr>
<td>Name :</td>
<td><input type="text" name="fullname" placeholder="Type your full name"></td>
</tr>
<tr>
<td>email :</td>
<td><input type="email" name="email" placeholder="ex:
[email protected]"></td>
</tr>
<tr>
<td>Type of contact :</td>
<td><input type="checkbox" name="checkbox" value="Report" >Report <br>
<input type="checkbox" name="checkbox" value="Feedback" >Feedback <br>
<input type="checkbox" name="checkbox" value="Suggestions" >Suggestions <br>
</td>
</tr>
<tr>
<td>Message:</td>
<td><textarea name="message" style="max-width:500px;" cols="60" rows="10" placeholder="Type message here"></textarea></td>
</tr>
</table>
<input type="submit">
</form>
</div>
contact.php
<?php
include('dbconnect.php');
class insertcontact{
public function recordcontact(){
// function for inserting videos
$Name = $_POST["fullname"];
$email = $_POST["email"];
$message = $_POST["message"];
$type = $_POST["checkbox"];
$date = new DateTime();
$contactdate = $date-> format('Y-m-d H:i:s');
if(empty($Name) || empty($email) || empty($message) || empty($type)){
return $result = "Missing information....!";
}else{
$strSQL = " INSERT INTO Contact (Name, email, message, contact_type, date ) VALUES ('".$Name."','".$email."','".$message."','".$type."','".$contactdate."')" ;
try{
mysql_query($strSQL);
$message = "Thank you for submitting.";
return $message ;
clearstatcache();
exit();
}
catch(CustomException $e){
throw new Exception( 'Something really gone wrong', 0, $e);
exit();
}
}
}
}
?>