PHP MySQL Apostrophe Problem

I have created a PHP form script but when the user inputs an apostrophe they get the following error:

Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'moo', '[url removed, login to view]', '2013-01-01 01:00', '2013-01-01 02:00', 'moo'moo', 'm' at line 2

I'm 99% sure I have to remove the apostrophe from the string, but do I have to do this for individually for each input field, or can this be done once for every input field?

Færdigheder: MySQL, PHP

Se mere: the string problem, string problem, moo com, line in problem, moo, php sql syntax error, php remove query string, sql syntax error, 2013 query, sure problem, mysql error 2013, mysql sql syntax, sql problem, php string remove, php mysql form script, sql syntax, script mysql query php, php remove string, sql query field, php form sql, mysql server error, mysql php input, apostrophe, user input sql query, query mysql script

Om arbejdsgiveren:
( 157 bedømmelser ) Bridgwater, United Kingdom

Projekt-ID: #4119171

Tildelt til:


lets discuss

$30 USD in 0 dage
(233 bedømmelser)

1 freelancer is bidding on average $40 for this job


Hello i can done this, Thanks

$40 USD in 2 dage
(27 bedømmelser)