<?php
$Dname = mysql_real_escape_string($_POST['name']);
$Dage = (int)$_POST['age'];
$row = mysql_query("select from users where name='$Dname' and age='$Dage'");
?>
<?php
$pdo = new PDO('mysql:dbname=testdb');
$sql = 'SELECT name, colour, calories
FROM fruit
WHERE calories < :calories AND colour = :colour';
$prep = $pdo->prepare($sql);
$prep->execute(array(':calories' => 150, ':colour' => 'red'));
$red = $prep->fetchAll();
$prep->execute(array(':calories' => 175, ':colour' => 'yellow'));
$yellow = $prep->fetchAll();
?>
<?php
$_POST['name'] = "/tmp;cat /etc/passwd";
$Sname = escapeshellarg($_POST['name']);
system("ls $Sname 2>&1");
?>