Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

slashes are being automatically added!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

slashes are being automatically added!

Postby sametch » Thu Oct 10, 2002 1:59 am

I have php 4.2.1 installed on my local machine (w2k, apache).

Whenever I process forms, slashes keep getting added to all quote marks automatically.

If I try using addslashes($string) I end up with three slashes for each quote mark! It's driving me mad because If I upload the same pages to my remote web server, the this does not happen.

In otherwords when debugging code locally I need do nothing to prevent quotemarks messing things up, but remoteley I need to addslashes to all form processed code. So I need two different sets of code!

Does anyone know why this should be happening?

sametch :(
sametch
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed Jul 03, 2002 3:10 am

Postby Jay » Thu Oct 10, 2002 2:49 am

Your local machine has got magic_quotes set to on in the php.ini file. Change this to off, and restart the server, and it should be OK
Jay
 

Postby sametch » Thu Oct 10, 2002 3:24 am

Thanks!

now sorted

sametch :)
sametch
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed Jul 03, 2002 3:10 am


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.