Código PHP:
<?php
if (isset($_POST['nombre']) and isset($_POST['edad'])){
include "conexion.php";
$sql="SELECT * FROM datos WHERE nombre='$_POST[nombre]' and edad='$_POST[edad]' ORDER BY nombre='$_POST[nombre]' and edad='$_POST[edad]' LIMIT 3";
$consulta=@mysql_query($sql,$conexion);
?>
Leete el articulo que te comenta abimaelrc para que aprendas bien a utilizar las sintaxis de MYSQL