Great sounds like a winner :)

"Frank M. Kromann" <[EMAIL PROTECTED]> wrote on 10/1/2001 2:32:27 PM:
>
>Hi Charles,
>
>I useally disable all magic quotes in php.ini and handle everyting in my scripts. 
>This way I only get 
single quotes when I need them and I dont have to do a stripslashes() !
>
>- Frank
>
>> "Frank M. Kromann" <[EMAIL PROTECTED]> wrote on 10/1/2001 1:42:02 PM:
>> >
>> >You should replace a single quote with a double qoute before inserting/updating 
>values.
>> >
>> >$new_variable = str_replace("'", "''", $variable);
>> >
>> >will do the trick.
>> >
>> >- Frank
>> >
>> >> I'm getting funky error codes, even with doing addslashes($variable); but its 
>not 
>> >> escaping the 's, I have even resorted to str_replace() and still nothing....
>> >> 
>> >> below is error output.
>> >> Warning: MS SQL message: Line 1: Incorrect syntax near 'b'. (severity 15) in 
>> >> \jtron\home\admin\functions.php on line 82
>> >> 
>> >> Warning: MS SQL message: Unclosed quotation mark before the character 
>> >> string ')'. (severity 15) in \jtron\home\admin\functions.php on line 82
>> >> 
>> >> Warning: MS SQL: Query failed in \jtron\home\admin\functions.php on line 
>> >> 82
>> >> 
>> >> 
>> >> -- 
>> >> PHP Database 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]
>> >> 
>> >> 
>> >>
>> 
>> well that works great, save for the fact that if you WANT /'s in there tho :/ 
>because if you want to 
>> retain your single quotes without having a backslash in the code, you have to 
>strtipslashes() if you 
dont 
>> want it to show up :-/ what a dillemma
>> 
>> 
>>



-- 
PHP Database 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