http://www.php.net/manual/en/function.addslashes.php

Justin Garrett

"Mike Hilty" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>     I am running into an issue where when a user inputs an apostrophie '
> into the textarea section of my form, it will generate an error in the SQL
> statement.
>     I have narrowed down the issue to this snippet of code:
>
> $insertQuery = "INSERT INTO changeLog(vendorNumber, newVendorNumber,
> oldName, newName, changedBy, dateChanged, comments)
>
VALUES('$vendorNumber','$newVendorNumber','$oldName','$newName','$changedBy'
> ,'$dateChanged','$comments')";
>
>     The thing that is causing this issue is the use of apostrophies to
> designate my variables in the SQL query.  How do I rewrite this to avoid
> this issue?
>
>
>
> Thanks,
>
> Mike Hilty
>
>
>



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

Reply via email to