note 95228 deleted from function.mysql-real-escape-string by degeberg

From: Date: Sat, 19 Dec 2009 22:22:31 +0000
Subject: note 95228 deleted from function.mysql-real-escape-string by degeberg
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164144@lists.php.net to get a copy of this message
Note Submitter: eric at madhack dot com Reason: 5 ---- 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.

« previous php.notes (#164144) next »