Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 5
    Aside from the confusingness of this response, you may also be vulnerable to SQL injection, assuming you're using PHP. Commented Jun 26, 2018 at 18:35
  • 4
    1. There is bug in your SQL code. 2. The next $sql value will replace the previous $sql value. Commented Oct 18, 2018 at 10:31
  • 2
    small hint for future readers, this is a really easy mistake to make especially for a novice, NEVER NEVER EVER insert a raw string into a sql query there's a rather nasty attack that users of our website can do to call random queries, more info owasp.org/www-community/attacks/SQL_Injection most libraries will have a sanitiser function to edit variables into safe forms that don't break out and escape the quotes Commented Sep 29, 2021 at 7:40