$corrected_string=addslashes($string_to_correct)   ????

I think this function does it...

or maybe :

$corrected_string=ereg_replace("/'/","\'",$string_to_correct)   ---->(i'm
not sure of the syntax).


    (°-        Nayco,
    //\        [EMAIL PROTECTED]
    v_/_     http://nayco.free.fr
----- Original Message -----
From: Brandon Orther <[EMAIL PROTECTED]>
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 6:09 PM
Subject: [PHP] Convert a string so it is valid for a sql query


> Hello,
>
> Is there a function to convert a string so it is a valid string of text
> for a SQL query?  AN example would be a string of text that has ' in it
> would be converted to \'
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to