: Get mysql_real_escape is giving me errors when I try and add security to my website I tried doing this: @ $db = new myConnectDB(); $beerName = mysql_real_escape_string($beerName); $beerID = mysql_real_escape_string($beerID);
I tried doing this:
@ $db = new myConnectDB();
$beerName = mysql_real_escape_string($beerName);
$beerID = mysql_real_escape_string($beerID);
$brewery = mysql_real_escape_string($brewery);
$style = mysql_real_escape_string($style);
$userID = mysql_real_escape_string($userID);
$abv = mysql_real_escape_string($abv);
$ibu = mysql_real_escape_string($ibu);
$breweryID = mysql_real_escape_string($breweryID);
$icon = mysql_real_escape_string($icon);
I get this error:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user
More posts by @Yeniel560
1 Comments
Sorted by latest first Latest Oldest Best
All of PHP's mysql_* functions, including mysql_real_escape_string() have been deprecated, in favour of the mysqli and PDO extensions.
See Deprecated PHP (A blog set up by two StackOverflow members).
Use query binding (SELECT * FROM table WHERE ? with a $condition) and you won't have to use the function you mention.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.