Problem with While Loop in PHP

makan

New Member
Any suggestion of whats wrong with my WHILE Loop?\[code\] <?php include('header.php'); $manage = "current_page_item"; include('nav.php'); include('sidebar.php'); ?> <div class="primary"> <br/> <?php $userId = $_GET['id']; echo "<div class=\"item_list\">"; $sql = "SELECT * FROM user WHERE id = " . intval($userId); $result = mysql_query($sql); while($item = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<b>Title: </b>" . $item['item'] . "<br/><b>Email: </b>" . $item['email'] . "<br/>"; echo "<b>Price: </b>" . $item['price'] . "</b><br/><b>Category: </b>" . $item['category'] . "</b><br/> <b>Extra: </b>" . ($item['extra'] ."</b><br/><b>Date Listed: </b>". $item['date']; } echo "</div>";?></div><?php include('footer.php'); ?>\[/code\]
 
Back
Top