note 95228 added to function.mysql-real-escape-string
| From: | eric at madhack dot com | Date: | Sat, 19 Dec 2009 22:15:11 +0000 |
| Subject: | note 95228 added to function.mysql-real-escape-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164143@lists.php.net to get a copy of this message | ||
You must have a connection via mysql_connect before you can successfully do
mysql_real_escape_string.
I spent a lot of time on a system that wasn't giving error messages because of the php
configuration. If you haven't made a database connection with mysql_connect,
mysql_real_escape_string will leave you with mysteriously empty POST variables. In the absence of
any error messages being displayed, I was quite lost for a while. The POST vars would be there, but
as soon as I ran mysql_real_escape_string on it, they would go empty. Once I put in my connection,
everything went smoothly.
----
Server IP: 192.41.40.227
Probable Submitter: 98.191.116.203
----
Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php
Edit -- https://master.php.net/note/edit/95228
Del: integrated -- https://master.php.net/note/delete/95228/integrated
Del: useless -- https://master.php.net/note/delete/95228/useless
Del: bad code -- https://master.php.net/note/delete/95228/bad+code
Del: spam -- https://master.php.net/note/delete/95228/spam
Del: non-english -- https://master.php.net/note/delete/95228/non-english
Del: in docs -- https://master.php.net/note/delete/95228/in+docs
Del: other reasons-- https://master.php.net/note/delete/95228
Reject -- https://master.php.net/note/reject/95228
Search -- https://master.php.net/manage/user-notes.php