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?

Kemahiran: MySQL, PHP

Lihat lagi: 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

Tentang Majikan:
( 157 ulasan ) Bridgwater, United Kingdom

ID Projek: #4119171

Dianugerahkan kepada:


lets discuss

$30 USD dalam 0 hari
(233 Ulasan)

1 pekerja bebas membida secara purata $40 untuk pekerjaan ini


Hello i can done this, Thanks

$40 USD dalam 2 hari
(27 Ulasan)