PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$a = "Book of student";
$b = "Student's book";
$query1 = "INSERT INTO table1 (str1) VALUES ('$a')";
...
$query2 = "INSERT INTO table1 (str1) VALUES ('$b')";
...
If i execute query1 and query2, query1 is successed and query2 is failed. This is because in string $b, there is a character ('). So anybody knows how to solve this problem? I mean the problem if we want to save a string variable that contain a character (').
Last edited by S_henry on Wed May 18, 2005 2:22 am, edited 1 time in total.