Parašė avice· 2010 Lie. 1 20:07:08
#14
Kaip padaryt taip:
turiu toki koda:su
mysql
<?php
mysql_connect("localhost", "wongerlt_451", "slapta") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("wongerlt_451") or die(mysql_error());
echo "Connected to Database";
?>
<br>
<?
$sql = mysql_query("SELECT * FROM serw ORDER by ID DESC");
while ($row = mysql_fetch_assoc($sql)) {
echo "ID : {$row['vardas']}<br>";
echo "<hr>";
}
?>
ir as noriu iterpt vietoj:
echo "ID : {$row['vardas']}<br>";
toki koda:
<center><table width="637" border="0">
<tr>
<td width="93"><center><a href="{$row['id']}">{$row['vardas']}</a></center></td>
<td width="70"><center>{$row['id']}</center></td>
<td width="17"><center>{$row['id']}</center></td>
<td width="77"><center>{$row['id']}</center>
</tr>
</table></center>
Bet nieks nesigauna error meta.
padekit ;D
Redagavo avice· 2010 Lie. 10 18:07:28