<?php
	$sql = "SELECT id, year FROM issues";
   // $res = mysql_query($sql,$cons) or die(mysql_error()); 
    $result = $conn->query($sql); 
?>				
			<div id="sidebar2">
					<ul>
						<li>
							<h2>Previous Issues</h2>
							<ul>
                                <?php 
								//	while ($row=mysql_fetch_array($res)){
								 while($row = $result->fetch_assoc()) {
									echo "<li><a href= pub_issues.php?issue_id=$row[id]>".$row['year']."</a></li>"; } ?>
							</ul>
						</li>
					</ul>
				</div>
			</div>
            <div id="sidebar2">
					<ul>
						<li>
							<ul>
 								<center><li><img src="<?php echo $aworan ?>" width="200" /></li></center>
 							</ul>
						</li>
					</ul>
                   
				</div>
				<div style="clear: both;">&nbsp;</div> 
                <?php
                $conn->close();
                ?>
			</div>