/sql-injection-in-php

SQL Injection in PHP

Primary LanguagePHP

SQL Injections in PHP: Practices to avoid

Code related to article SQL Injections in PHP

Requisites

  • PHP 7
  • composer
  • PHP pdo_sqlite extension
  • Optionally, pdo_mysql extension and an accessible MySQL server

Install

Execute composer to check dependencies and generate the needed autoload code. That will create the corresponding vendor/folder.

Execute php -S localhost:8080 to launch a local HTTP server listening in port 8080.

Using your browser, access http://localhost:8080/findStudent.php to access the vulnerable Find Student app.