PHP 8.5.0 Alpha 4 available for testing

Voting

: nine plus zero?
(Example: nine)

The Note You're Voting On

asmith16 at littlesvr dot ca
11 years ago
Please note that the string returned may contain data initially provided by the user, possibly making your code vulnerable to XSS.

So even if you escape everything in your SQL query using mysqli_real_escape_string(), make sure that if you plan to display the string returned by mysqli_error() you run that string through htmlspecialchars().

As far as I can tell the two escape functions don't escape the same characters, which is why you need both (the first for SQL and the second for HTML/JS).

<< Back to user notes page

To Top