php-db | 2000121
Date: 12/14/00
- Next message: Zhou Hao: "[PHP-DB] query no longer than 5 minutes?"
- Previous message: Salim Meethoo: "[PHP-DB] Big Pb with PHP & MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Actually PHP automatically add backslashes before charaacters that need to
be quoted in form variables. But try this: Use AddSlashes function:
$var = AddSlashes($var);
and then:
mssql_query("... '$var' ...", $db);
You can read more about AddSlashes function at
http://www.php.net/manual/function.addslashes.php
Best regards,
Joseph Hadinata
BlueChillies Download Destination
http://BlueChillies.com
--- ORINAL MESSAGE ---
Hi--
When a user enters either a single quote (') or a double quote ("), and I
send it to my MSSQL table, sometimes I get an error message as "an
incorrect syntax" or "query failed".
I need to let users enter those characters.
How can I handle single and double quotes on PHP?
Thanks!
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Zhou Hao: "[PHP-DB] query no longer than 5 minutes?"
- Previous message: Salim Meethoo: "[PHP-DB] Big Pb with PHP & MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

