I feel daft asking this, but it's driving me potty. How can I make this string:
Children\''s Toy
Suitable for insert to a MySQL database and escape the characters properly?
Thanks
I feel daft asking this, but it's driving me potty. How can I make this string:
Children\''s Toy
Suitable for insert to a MySQL database and escape the characters properly?
Thanks
mysql_real_escape_string
should do it.
If you are using the mysqli
extension, you can do it the same way. ( mysqli_real_escape_string
)