Código PHP:
<?
include "conexion.php";
include "menu/menu.php";
$dato = $_POST["dato"];
$consulta = "SELECT * FROM registro WHERE
dato LIKE '%$nombre%' AND
dato LIKE '%$apellido%' AND
dato LIKE '%$cod%' AND
dato LIKE '%$correo%'";
$result = mysql_query($consulta) or die('Error, query failed');
if(mysql_num_rows($result) == 0)
{
echo "No se encontraron RESULTADOS <br>";
}else{
while ($row = mysql_fetch_array($result)){
$_SESSION["nombre"]=$row{'nombre'};
$_SESSION["apellido"]=$row{'apellido'};
echo $_SESSION["nombre"];
echo $_SESSION["apellido"];
}
}
?>