вывод новостей
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?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=utf-8" />
- <title>Новости</title>
- </head>
- <body>
- <?PHP
- include "conn.php";
- $id_news = $_SESSION['id_news'];
- echo '<meta http-equiv="refresh" content="1; URL=upnovosti.php">';
- }
- $query = "SELECT * FROM novosti ORDER BY id_news DESC";
- ?>
- <table width="600" border="1" cellspacing="1" cellpadding="1">
- <tr>
- <td><h3><? echo $nov['zagol'];?></h3></td>
- </tr>
- <tr>
- <td><? echo $nov['msg'];?></td>
- </tr>
- <tr>
- <td><? echo $nov['date'];?></td>
- </tr>
- <tr>
- <td><? echo $nov['img'];?></td>
- </tr>
- <tr>
- <td>Администратор:<font color="#006600"><strong><? echo $nov['admin'];?></strong></font></td>
- </tr>
- <tr>
- <td><a href='novosti.php?up=<?=$nov["id_news"]?>'>Редактировать</a></td>
- </tr>
- </table>
- <br><br>
- <?PHP
- }
- ?>
- </body>
- </html>