<?
/*
/* Voorbeeld PDO Injection preventie */ 
/*

$dsn     = 'mysql:dbname=yourdb;host=localhost';
// Connect to the database
$pdo     = new PDO($dsn, 'root','');
 
// The id
$_GET["id"] =  "1";
 
// Prepare the query
$sql    = $pdo->prepare("SELECT * FROM persons WHERE Id = :id LIMIT 1");
 
// Bind the parameter
$sql->bindParam(":id",$_GET["id"]);
 
// Execute SQL
$row    = $sql->execute();
    
// Get the result, in this case a row
$result = $sql->fetch(PDO::FETCH_ASSOC);

http://indieteq.com/index/readmore/how-to-prevent-sql-injection-in-php
*/

show_source(__FILE__);
?>