how can i replace开发者_JS百科 the ' character in php to - in order to save it to mysql database?
Use mysql_real_escape_string() !! And remember this function like FOREVER
Use parameterized queries.
Use mysql_real_escape_string($string)
.
Documentation can be found here: http://php.net/manual/en/function.mysql-real-escape-string.php
精彩评论