note 86759 deleted from function.mysql-real-escape-string by danbrown

From: Date: Sun, 02 Nov 2008 15:16:31 +0000
Subject: note 86759 deleted from function.mysql-real-escape-string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146050@lists.php.net to get a copy of this message
Note Submitter: willekej at yahoo dot com ---- I think it should be noted that the my_sql_escape_string also leaves the #-symbol unchanged. For instance the code @ $con = mysql_connect(..., ..., ...); $user_id = '1 #'; $password = '?'; $user_id = mysql_real_escape_string($user_id,$con); $password = mysql_real_escape_string($password,$con); $query = "SELECT * FROM users WHERE user_id = $user_id AND password ='$password'" ; echo $query; generates the SQL-query SELECT * FROM gebruikers WHERE user_id = 1 # AND password ='?' (Everything behind the #-symbol is considered a comment) Please inform me if I'm mistaken, Kind regards, Jan

« previous php.notes (#146050) next »