On Monday 25 February 2002 15:39, Tim Thorburn wrote:
> Hi,
>
> I'm having troubles entering information from a form into a MySQL
> database.  Specifically if the user enters an apostrophe anywhere in the
> form, all the information is rejected and nothing is entered into the
> database.
>
> After researching a little on php.net I found the addslashes() command -
> this did help briefly and I was able to use apostrophe's in the form ...
> but it seems as the problem has resurfaced.
>
> To make matters more frustrating, the addslashes() command works perfectly
> well on my local test machine (Win2k Pro, PHP 4.1.1, MySQL 3.23.44, Apache
> 1.3.23) but not at all on the server which is hosted by another company
> (Sun Solaris, PHP 3.0.16, MySQL 3.22.32, Apache 1.3.12).
>
> Does anyone have any suggestions as to why the addslashes() command worked
> for a short time on the webserver and why it stopped?  Or better yet, is
> there a variation of addslashes() that will work on an older version of PHP
> such as 3.0.16?

It could be that the configuration of your local and remote servers are 
different. Specifically check out the setting magic_quotes_gpc. Run phpinfo() 
on both to find out their settings.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
grep me no patterns and I'll tell you no lines.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to