I am trying to make a form which insert values in database using PDO
<?php
if(isset($_POST["submit"])){
$hostname='localhost';
$username='kod';
$password='';
try {
$dbh = new PDO("mysql:host=$hostname;dbname=kod",$username,$password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "INSERT INTO `user` (`OwnerName`, `PhoneNumber`, `EmailId`, `AdharNumber`, `Address`, `OutletName`, `OutletAddress`)
VALUES (`".$_POST[`OwnerName`]."`,
`".$_POST[`PhoneNumber`]."`,
`".$_POST[`EmailId`]."`
`".$_POST[`AdharNumber`]."`,
`".$_POST[`Address`]."`,
`".$_POST[`OutletName`]."`,
`".$_POST[`OutletAddress`]."`,)";
if ($dbh->query($sql)) {
header("Location: AdminProfile.php ");
//echo "<script type= 'text/javascript'>alert('New Record Inserted Successfully');</script>";
}
else{
echo "<script type= 'text/javascript'>alert('Data not successfully Inserted.');</script>";
}
$dbh = null;
}
catch(PDOException $e)
{
echo $e->getMessage();
}
}
?>
and now I am getting this error
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 8
kindly help