Skip to content

Instantly share code, notes, and snippets.

@valguss
Created November 15, 2010 16:52
Show Gist options
  • Save valguss/700585 to your computer and use it in GitHub Desktop.
Save valguss/700585 to your computer and use it in GitHub Desktop.
mysqlinjection.php
<?php
$name_evil = "'; DELETE FROM customers WHERE 1 or username = '";
$name_evil = mysql_real_escape_string($name_evil);
$query_evil = "SELECT * FROM customers WHERE username = '$name_evil'";
echo "Escaped Evil Injection: <br />" . $query_evil;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment