Look, I brought the cycle out of the database, now I need to link to the full article. I made an additional page for the full news, called news.php, and pasted a link to the name, here is the block code itself:
<?php $result=mysqlquery("SELECT name,image,classfilt,heightimg FROM mackmybase"); $n=mysql_num_rows($result); while ($row = mysql_fetch_assoc($result)) { echo <<< HEREDOC <a href="/news.php"> <ul id="tiles"> <li class="$row[classfilt]"><img src="$row[image]" height="$row[heightimg]" width="200"> <p>$row[name]</p> </li> </ul> </a> HEREDOC; }; function mysqlquery($query){ // для удобной отладки $result= mysql_query($query); if (!$result) die("Неверный запрос: ".mysql_error()."\n".$query); return $result; }; ?>
Need to do something in the link? Tell me.