i am beginner in php and mysql, php where I make an HTML table display name hour date and show me the table of my database containing the fields “name” “hour” “date”
The name of the database is androidhive and the table name is products
My code is:
<?php
include("connectbd.php"); //importamos el archivo para la coneccion a la base de datos
$res=mysql_query("SELECT * FROM products",$link); //Hacemos la consulta
?>
<html>
<head></head>
<body>
<?php
echo"<table><tr><td>Nombre</td><td>hora<td>fecha</td></tr>" //Hacemos una tabla html para ordenar los datos
while($row=mysql_fetch_array($res)){ //Guardaremos los datos en un array llamado $row cada indice del array sera el nombre del campo "Nombre","Apellidos", "Email", "Id"
echo"<td>".$row["Nombre"]." ".$row["hora"]."".$row["fecha"]</td>"; //le pasamos el id a la pagina del link para que reconosca el dato
}
echo"</table>";
?>
</body>
</html>
the error is SCREAM:
Error suppression ignored for
( ! ) Parse error: syntax error, unexpected ‘while’ (T_WHILE), expecting ‘,’ or ‘;’ in C:\wamp\www\droidlogin\citas.php on line 13
Replace :
To
Missing
."after$row["fecha"]