Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/09/2010, 07:51
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: Colocar resultados de una busqueda MySQL con PHP a un div

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" target="contenido">
  <div>
    <input type="text" name="buscar" />
    <input type="submit" value="Buscar" name="buscar" />
  </div>
</form>
<div id="contenido">
  <?php
if(isset($_POST['buscar'])){
    
//Código que ejecuta la select saca los resultados 
}
else{
echo 
"NO hay resultados";
}
?>
</div>
</body>
</html>
A ver si funciona, salu2