Kod
<html>
<head>
<style>
.reg {
font-family : Verdana, serif;
font-size : 13px;
font-weight : bold;
background-color : #a9c8d8;
}
.tab {
font-family : Verdana, serif;
font-size : 11px;
font-weight : normal;
background-color : #d4e6ef;
}
</style>
</head>
<body>
<?php
mysql_connect('localhost', 'root' , 'krasnal');
mysql_select_db("logowanie");
$query = mysql_query("select * from newsy order by data desc limit 0,6");
while($rekord = mysql_fetch_array($query))
{
echo '
';
echo '<table class="tab" border="0" width="40%" align="center">';
echo '<tr>';
echo '<td colspan="2" class="reg"><center>'.$rekord[1].'</center></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2">'.$rekord[2].'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>Dodał: '.$rekord[4].', Dnia: '.$rekord[3].'</td>';
echo '<td>Komentarzy [133]</td>';
echo '</tr>';
echo '</table>';
}
?>
<head>
<style>
.reg {
font-family : Verdana, serif;
font-size : 13px;
font-weight : bold;
background-color : #a9c8d8;
}
.tab {
font-family : Verdana, serif;
font-size : 11px;
font-weight : normal;
background-color : #d4e6ef;
}
</style>
</head>
<body>
<?php
mysql_connect('localhost', 'root' , 'krasnal');
mysql_select_db("logowanie");
$query = mysql_query("select * from newsy order by data desc limit 0,6");
while($rekord = mysql_fetch_array($query))
{
echo '
';
echo '<table class="tab" border="0" width="40%" align="center">';
echo '<tr>';
echo '<td colspan="2" class="reg"><center>'.$rekord[1].'</center></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2">'.$rekord[2].'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>Dodał: '.$rekord[4].', Dnia: '.$rekord[3].'</td>';
echo '<td>Komentarzy [133]</td>';
echo '</tr>';
echo '</table>';
}
?>