Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2015, 19:01
thinlizzy
 
Fecha de Ingreso: mayo-2013
Ubicación: CHILE
Mensajes: 17
Antigüedad: 11 años
Puntos: 0
Respuesta: No puedo mostrar los datos desde mysql en una tabla

efectue los cambios y me aparece error de sistaxis. POR LO QUE NO FUNCIONA

Código PHP:
<?php
require_once('conexion.php');
$search '';
if (isset(
$_POST['search'])){
    
$search $_POST['search'];
}
$consulta "SELECT * FROM alumnos WHERE nombre LIKE '%".$search."%'" ;
$resultado $conexion->query($consulta);
mysql_fetch_assoc($resultado);

?>

<?php if ($resultado>&& $search!='') {?>
<h2>REGISTROS</h2>
<?php 
echo "<table>";  
echo 
"<tr>";  
echo 
"<th>Nombre</th>";  
echo 
"<th>edad</th>";  
echo 
"<th>Pais</th>";  
echo 
"</tr>";  
while (
$fila mysql_fetch_assoc($resultado)){   
    echo 
"<tr>";  
    echo 
"<td>$fila['nombre']</td>";  
    echo 
"<td>$fila['apellido']</td>";  
    echo 
"<td>$fila['nit']</td>";  
    echo 
"</tr>";  
}
 echo 
"</table>"?>

<?php }?>
[URL="http://imagizer.imageshack.us/a/img661/486/mmLhxg.jpg"]http://imagizer.imageshack.us/a/img661/486/mmLhxg.jpg[/URL]