Problema generare tabel
Scris: Dum Mai 23, 2010
Problema mea este urmatoarea:
Am urmatorul cod:
Il pun in pagina si imi arata de doua ori tabelu cu datele din cod:((Am incetcat dar nu merge sa fk sa nu arate doua pls HELP.
Am urmatorul cod:
Cod: SelectaĊ£i tot
<?php
$fisier=$_GET['file'];
$conn = mysql_connect("localhost", "xfilex", "xfilex")
or die("Unable to connect to MySQL");
$selectdb = mysql_select_db('xfilex');
$utilizator=mysql_real_escape_string($_GET['file']);
$cerereSQL = 'SELECT * FROM fisiere WHERE fisier="'.$_GET['file'].'"';
$rezultat = mysql_query($cerereSQL);
if(mysql_num_rows($rezultat) > 0) {
while($rand = mysql_fetch_array($rezultat)) {
echo '<center>
<table border="0" class="acces" width="97%" bgcolor="#C6E5B7">
Descarca fisierul '.$fisier.'
</table>
</center>';
echo "<table border='0' width='50%'><tr>";
echo '<td class="margins"><font class="general">Nume fisier: </font><font class="general_red" color="red"><b>'.$_GET['fisier'].'</font></b></tr></td>';
echo'<br>';
echo '<tr><td class="margins"><font class="general">Marime: </font><font class="general_red" color="red"><b>filesize($fisier)</font></b></td></tr>';
echo'<br>';
echo '<tr><td class="margins"><font class="general">Data uploadului: </font><font class="general_red" color="red"><b>'.$rand['data'].'</font></b></td></tr>';
echo '<tr><td class="margins"><font class="general">Uploader: </font><font class="general_red" color="red"><b>'.$rand['uploader'].'</font></b></td></tr>';
echo '<tr><td class="margins"><font class="general">Descarcari: </font><font class="general_red" color="red"><b>'.$rand['descarcari'].'</font></b></td></tr>';
echo'<br>';
echo '<tr><td class="margins"><font class="general">Descriere: </font><font class="general_red" color="red"><b>'.$rand['descriere'].'</font></b></td></tr>';
echo '<br>';
echo "</table>";
echo "</center>";
}
}
?>
<?php
echo '<br>';
echo '<br>';
echo '<a href="'.$url.'/d/download2.php?file='.$fisier.'"><img src="download.gif"></a>';
echo '<br>';
echo '<br>';
echo 'Adresa fisierului este:<br><input type="text" name="thetext" size="60" value="http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'download.php?file='.$fisier.'">';
?>