you need a loop to gather all the results
I don't know your table fields so I just used name, fileName, and date
then I echo out the $dynamicList in your page body
<?php
session_start();
// determine which query value based on session
if (isset($_SESSION['user_level'])) {
if($_SESSION['user_level']== 1) {$ul = 1;}
if($_SESSION['user_level']== 2) {$ul = 2;}
if($_SESSION['user_level']== 3) {$ul = 3;}
if($_SESSION['user_level']== 4) {$ul = 4;}
}
//run query
$sql = mysql_query("SELECT * FROM policies WHERE $ul='1'");
//initialize
$dynamicList = "";
//get count
$numRows = mysql_num_rows($sql);
//see if any returns
if ($numRows < 1) {
$dynamicList = "Nothing to show";
//if results start loop
} else {
while($row = mysql_fetch_array($sql)){
$name = $row["name"];
$fileName = $row["fileName"];
$date = $row["date"];
$dynamicList .= ' ' . $name . ' ' . $fileName . ' ' . $date . '<br />';
}
}
//display the list
echo $dynamicList;
?>