Dropdown = Link

hab ich heute noch gemacht !!!
Hier der Quelltext !

PHP:
<tr>
<?
$conn_id=mysql_connect($host,$user,$pwd);
mysql_select_db($database,$conn_id);
$query="select * from $table_kat order by id asc";
$result=mysql_query($query,$conn_id);
while ($row=mysql_fetch_array($result))
{$id=$row['id'];
$name=$row['name'];

echo "<td>
<select name=\"$name\" onChange=\"top.location.href=this.options[selectedIndex].value;\">

<option selected>$name\n";
$query2="select * from $table_links where kat = $id order by id asc";
$result2=mysql_query($query2,$conn_id);

while ($row2=mysql_fetch_array($result2))
{$name2=$row2['name'];
$url=$row2['url'];

echo "<option value=\"$url\">$name2\n";}
echo "</select>
</td>\n";}
?>
</tr>

Hoffe Dir geholfen haben zu können : )))

code_red
 

Neue Beiträge

Zurück