Problem with slideshow in php

hi i am newbie to php…i am trying to run out a javascript using php.the problem with my script is its fetches only the last image…i want it to be in sequence
here is my codding

      <table width="100">
	   <tr>

<?php require_once(‘connection.php’);

$sqlquery = “select * from styles”;
$rowdet = mysql_query($sqlquery);
$i = 1;
while($row_det = mysql_fetch_array($rowdet)) {
$img* = $row_det[‘image’];
$des = $row_det[‘desc’];
}?>
<td id=“slide<?php echo $i ?>” class=“slides” width=“100”>
<?php
echo $des;
echo “<img src=‘images/$img*’ />”;
?></td>
<?php
$i+=1;
?>
</tr>
</table>