Skip to content

Instantly share code, notes, and snippets.

@stevesohcot
Created November 14, 2021 18:49
Show Gist options
  • Select an option

  • Save stevesohcot/39f3b24ef1150bf01f8901d56a05f418 to your computer and use it in GitHub Desktop.

Select an option

Save stevesohcot/39f3b24ef1150bf01f8901d56a05f418 to your computer and use it in GitHub Desktop.
PHP SQL Injection Prevention - function usage
<?php
$first_name = quote_smart($db1, $_POST['first_name']);
$query = "INSERT INTO Users (`first_name`) VALUES ('$first_name')";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment