Cod: Selectaţi tot
<center>
<table border="0">
<tr>
<td></td>
</tr>
<tr>
<th aling="center">
<?php
include("config.php");
$conn = mysql_connect("$l", "$u", "$p")
or die("Unable to connect to MySQL");
$selectdb = mysql_select_db(''.$db.'');
$cerereSQL = "SELECT * FROM `poze_fete` ORDER BY RAND(NOW()) LIMIT 2";
$rezultat = mysql_query($cerereSQL);
if(mysql_num_rows($rezultat) > 0) {
while($rand = mysql_fetch_array($rezultat)) {
$ip = $_SERVER['REMOTE_ADDR'];
$cerereSQL2 = 'SELECT * FROM voturi WHERE ip="'.$ip.'"';
$rezultat2 = mysql_query($cerereSQL2);
if(mysql_num_rows($rezultat2) > 0) {
while($rand2 = mysql_fetch_array($rezultat2)) {
$acc = $rand2['voturi'];
$acc2 = $acc ;
if ($acc2 < 5 )
echo '<a href="vot.php?fata='.$rand['id'].'"><img src="'.$rand['imagine'].'" widht="200" height="300" title="'.$rand['nume'].'"></a> <br><a href="pagina_vot.php">Alte fete</a>';
elseif ($acc2 > 5)
echo 'Nu mai ';
elseif ($acc2 = 5)
echo 'poti vota !';
}
}
}
}
?>
</th>
</tr>
</table>
</center>