php - msqli_fetch_array() doesnt work? -


i have following code:

<?php  $link = mysqli_connect( 'localhost', 'root', '', 'pruebatiendas');  mysqli_error($link);   $que = "select * categoria";  $result = mysqli_query($link,$que) or die(mysqli_error($link));  ?>  <!doctype html>  <html lang="es-co">  <head>  <meta http-equiv="content-type" content="text/html; charset=utf-8">  <title>imagenes</title>  </head>  <body>  <?php while($row=mysqli_fetch_array($result)) { ?>  <a href="prueba.html"><?php echo $row['nombre_c']?></a><br/>  <?php } ?>  </body>  </html>

but not show me links, wrong?

if understand correctly, that's need:

<?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("pruebatiendas") or die(mysql_error());   $query = mysql_query("select * categoria")  or die(mysql_error());    <?php  while($row = mysql_fetch_array($query)) { echo "<a href='prueba.html'>".$row['nombre_c']."</a><br />"; } ?> 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -