mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-29 16:19:55 +02:00
coding style fix
This commit is contained in:
@@ -45,7 +45,7 @@ which will delete all of your users! Instead, you should sanitize the ID input u
|
||||
<?php
|
||||
$pdo = new PDO('sqlite:users.db');
|
||||
$stmt = $pdo->prepare('SELECT name FROM users WHERE id = :id');
|
||||
$stmt->bindParam(':id', $_GET['id'], PDO::PARAM_INT); //<-- Automatically sanitized by PDO
|
||||
$stmt->bindParam(':id', $_GET['id'], PDO::PARAM_INT); // <-- Automatically sanitized by PDO
|
||||
$stmt->execute();
|
||||
{% endhighlight %}
|
||||
|
||||
|
Reference in New Issue
Block a user