<?php
include ("config.php");
echo ' Dinlemek Istediginiz Maçi Seçiniz';
$oku = mysql_query ("select * from board order by 'ID' DESC");
$action = $_GET["action"];
echo ' <form name="form1" method="post" action="anlatimboard.php?action=2">
<label>
<select name="macsec" id="select">
<option selected>Lutfen Mac Seciniz</option>';
while ($yaz= mysql_fetch_array ($oku)){
$boardname = $yaz[Boardname];
$ID = $yaz[ID];
echo '
<option value='.$ID.'>'.$boardname.'</option>
';
}
echo ' </select>
</label>
<label>
<input type="submit" name="button" id="button" value="Gönder">
</label>
</form>
';
$action = $_GET["action"];
switch ($action)
{
case "2":
$macsec = $_POST["macsec"];
$oku = mysql_query ("select * from mesaj where ID_Board = '$macsec'");
echo ' <table width="100%" border="0" cellpadding="0" cellspacing="0"> ';
$count=0;
while ($yaz = mysql_fetch_array ($oku))
{
$renkler=array('#CCCCCC','#FFFFFF');
$dakika = $yaz[Dakika];
$mesaj = $yaz[Mesaj];
$id = $yaz[ID];
echo '<tr>
<td width="10%" bgcolor="'.$renkler[$count].'">'.$dakika.'</td>
<td width="90%" bgcolor="'.$renkler[$count].'">'.$mesaj.'</td>
</tr>
';
$count++;
if ($count == 2) $count=0;
}
echo '</table>';
break;
}
?>Buyur dostum. %100 çözüm.