note 9257 added to Microsoft SQL Server functions

From: Date: Wed, 25 Oct 2000 03:06:26 +0000
Subject: note 9257 added to Microsoft SQL Server functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-6929@lists.php.net to get a copy of this message
Hi, I am developing a form on php3 which sends data back to a database. I encountered a problem which I hope someone can help me with. Let's say I have a textbox with the name 'text' in my form. When I insert that into the database, the SQL would be INSERT TextField values ('$text'). The problem I face is that the SQL won't work if there is a single quotation mark in the $text textbox. I assume it's because the SQL reads it as a terminator for the variable name. Can someone please let me know how I can get around this problem ? http://www.php.net/manual/ref.mssql.php

« previous php.notes (#6929) next »