sorry for that here is the form…
<?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
include_once 'includes/config.php';
if(isset($_POST['submit'])){
$fullname=$_POST['fullname'];
$mobilenumber=$_POST['mobilenumber'];
$email=$_POST['email'];
$age=$_POST['age'];
$gender=$_POST['gender'];
$bloodgroups=$_POST['bloodgroups'];
$donate=$_POST['donate'];
$location=$_POST['location'];
$message=$_POST['message'];
$status=1;
$sql="INSERT INTO tblblooddonars(fullname,mobilenumber,email,age,gender,bloodgroups,donate,message,status) VALUES(:fullname,:mobilenumber,:email,:age,:gender,:bloodgroups,:donate,:message,:status)";
$query = $dbh->prepare($sql);
$query->bindParam(':fullname',$fullname,PDO::PARAM_STR);
$query->bindParam(':mobilenumber',$mobilenumber,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':age',$age,PDO::PARAM_STR);
$query->bindParam(':gender',$gender,PDO::PARAM_STR);
$query->bindParam(':bloodgroups',$bloodgroups,PDO::PARAM_STR);
$query->bindParam(':donate',$donate,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
if($lastInsertId) {
$msg="Your info submitted successfully";
}else {
$error="Something went wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Donate/Acceptor Panel</title>
<link href="css/user.css" rel="stylesheet">
</head>
<body>
<?php
include_once 'includes/config.php';
$sql = $dbh -> prepare('SELECT * FROM users WHERE id = :id');
$sql->bindValue(':id', $_SESSION['id']);
$sql->execute();
$result = $sql->fetch();
echo'WELCOME '.strtoupper($result['username']);
?>
</br>
</br>
<button onclick="window.location.href='logout.php'">Logout</button>
<hr>
<h1 style="text-align: center;">Become a Donor/Acceptor</h1>
<div class="container">
<form action="" method="POST">
<section>
<div style="float:left; margin-right:20px;">
<label for="fname">Full Name<span class="required">*</span></label>
<input type="text" id="fname" name="fullname" placeholder="Your Full Name..">
</div>
<div>
<label for="mobilenumber">Mobile No.<span class="required">*</span></label>
<input type="text" id="mobilenumber" name="mobilenumber" placeholder="Your Mobile Number..">
</div>
<div style="float:left;margin-right:20px;">
<label for="email">Email ID<span class="required">*</span></label>
<input type="text" id="email" name="email" placeholder="Your Email Address..">
</div>
<div >
<label for="age">Age<span class="required">*</span></label>
<input type="text" id="age" name="age" placeholder="Your Age..">
</div>
<div style="float:left; margin-right:20px;">
<label for="gender">Gender<span class="required">*</span></label>
<select id="gender" name="gender">
<option value="male">Male</option>
<option value="female">Female</option>
</select>
</div>
<div>
<label for="bloodgroups">Blood groups<span class="required">*</span></label>
<select id="bloodgroups" name="bloodgroups">
<option value="AB-">AB-</option>
<option value="B-">B-</option>
<option value="AB+">AB+</option>
<option value="A-">A-</option>
<option value="O-">O-</option>
<option value="B+">B+</option>
<option value="A+">A+</option>
<option value="O+">O+</option>
</select>
</div>
<div style="float:left;margin-right:20px;">
<label for="donor/acceptor">Donor/Acceptor<span class="required">*</span></label>
<select id="donor/acceptor" name="donate">
<option value="donor">Donor</option>
<option value="acceptor">Acceptor</option>
</select>
</div>
<div>
<label for="location">Location<span class="required">*</span></label>
<select id="location" name="location">
<option value="Mombasa CBD">New york</option>
<option value="Changamwe">Texas</option>
<option value="Tudor">California</option>
<option value="Majengo">Philly</option>
<option value="Nyali">L.A</option>
<option value="Bombolulu">Arizona</option>
<option value="Likoni">Florida</option>
<option value="Kongowea">Hawaii</option>
</select>
</div>
<br style="clear:both;" />
</section>
<section>
<div>
<label for="message">Message</label>
<textarea rows="4" cols="50" name="message" class="required">Write Something. </textarea>
</div>
</section>
<br style="clear:both;" />
<div>
<input type="submit" name="submit" value="Submit">
</div>
</form>
</div>
</body>
</html>