Cheers PaulNaj
I have sorted question 2 myself using onclick jacascript - silly really.
Do you know why the code below is now returning me the correct number of options in the list but the text isn't visable (apart from the please select)? The value is right for my redirect because that works still.
<?php
$sql = "SELECT id, name, xtype FROM sysobjects WHERE (xtype = 'u') ORDER BY name";
$sql_result = mssql_query($sql) or die("Couldn't execute query.");
$row = @mssql_fetch_array($sql_result);
$nice_name = array
("itcommodity" => "Commodities",
"mnparams" => "Parameters",
"srcty" => "City",
"srsic" => "SIC CODE",
"srvat" => "VAT",
"srvrate" => "VAT RATE",
"srvregister" => "VAT Register"
);
while ($row = @mssql_fetch_array($sql))
{
$display_name = $nice_name[$row->actual_name];
}
echo "
<select name=\"table_select\" onChange=\"return jump(this);\">
<option value=\"\">Please Select</option> ";
while ($row = @mssql_fetch_array($sql_result))
{
$Name = $row["name"];
$Id = $row["id"];
echo "<option value=\"$Name.php\">$display_name</option>";
}
echo "
</select>
";
?>