note 40371 added to function.mysql-escape-string
| From: | bkimble at ebaseweb dot com | Date: | Mon, 01 Mar 2004 21:56:09 +0000 |
| Subject: | note 40371 added to function.mysql-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66060@lists.php.net to get a copy of this message | ||
here is a quick function to mysql_escape_string all of your string variables inside of an object.
function EscapeAll()
{
foreach (get_object_vars($this) as $varname => $varvalue)
{
if (is_string($this->{$varname}))
{
$this->{$varname} = mysql_escape_string($this->{$varname});
}
}
}
----
Manual Page -- http://www.php.net/manual/en/function.mysql-escape-string.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40371
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40371&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40371&report=yes
Search -- http://master.php.net/manage/user-notes.php