When my program is running localhost, its working perfect. When it’s on 000webhost.com, via php admin, this correct statement:
select * from table where name like ‘testi%’;
is changed to (\ is injected before all ‘)
select * from table where name like \’testi%\’;
and will generate an error. the version of mysql and php they are using is mysql 5.5 and php 5.2. anyone knows how to fix this stupid problem? I’m positive the error is not within my code since its working fine on localhost.
You are running into the evil, evil Magic Quotes. Consult your host’s documentation for exactly which method they use to turn it off, but you will either create an
.htaccessfile or aphp.inifile in the root of your domain’s www/ directory.PHP manual info: http://www.php.net/manual/en/security.magicquotes.disabling.php