Is my code is vulnerable to sql Injection.It is hardly coded
if (isset($_POST['submit'])) {
$content = strip_tags($_POST['cont'],'<h1>,<br>,<h2>,<h3>,<h4>,<strong>,<a>');
$content_date = date('d-m-y');
if (!empty($content)) {
$check = "SELECT * FROM post WHERE user_id = ?";
$stmt = $con->prepare($check);
$stmt->bind_param("i",$my_id);
$stmt->execute();
$stmt->store_result();
$numberofrows = $stmt->num_rows;
if ($numberofrows == 1) {
$up = "UPDATE post SET content = ? , con_date = ? WHERE user_id = ? ";
$stmtup = $con->prepare($up);
$stmtup->bind_param("ssi",$content,$content_date,$my_id);
$stmtup->execute();
$stmtup->close();
echo "<script>alert('Information Updated')</script>";
echo "<meta http-equiv='refresh' content='0'>";
}else{
$in = "INSERT INTO post(user_id,content,con_date) VALUES (?,?,?) ";
$stmtin = $con->prepare($in);
$stmtin->bind_param("iss",$my_id,$content,$content_date);
$stmtin->execute();
$stmtin->close();
echo "<script>alert('Information Updated')</script>";
echo "<meta http-equiv='refresh' content='0'>";
}
}else{
echo "<script>alert('Please fill the Fields')</script>";
exit();
}
}