I have a form in which i add an "attraction" to my sql database. my problem is that the input area is not tolerant of apostrophes. since this form is in hebrew, apostophes are very important since they are used a lot!!
EDIT - This is my revised code after viewing the pages you refered me to:
$query1=$conn->prepare("INSERT INTO guide(Name,Country,Attraction,Email,Phone,Picture) VALUES(:name,:country,:attraction,:email,:phone,:picture) ");
$query1->bindValue(':name', $name);
$query1->bindValue(':country', $country);
$query1->bindValue(':attraction', $attraction);
$query1->bindValue(':email', $email);
$query1->bindValue(':phone', $phone);
$query1->bindValue(':picture', $picture);
$query1->execute();
$result=mysqli_query($conn,$query1);
EDIT2 - Also tried:
$query1=$conn->prepare("INSERT INTO guide (Name,Country,Attraction,Email,Phone) VALUES (?,?,?,?,?) ");
$query1->bind_param("sssss", $name, $country, $attraction, $phone ,$email);
$query1->execute();
$result=mysqli_query($conn,$query1);
if($result){
header("Location:add_review.php");
}
else{
echo " ERROR MESSAGE ";
}
}
Edit 3 Solved -- What i needed was very simple.. this was my solution:
$name = str_replace("'","''",$name);