I need to know how you can automatically go to a link when you select an option from a drop down box.
This is my current code:
Code: Select all
<select name="MedeWerker">
<?php
if ($LidBedrijf)
{
$Database2=mysql_query("SELECT * from Mw_Hdr where LidHdrNr = '$LidBedrijf';");
while($Rij2=mysql_fetch_array($Database2))
{
echo "<option value=\"";
echo $Rij2["MwHdrNr"]."\"";
if($MedeWerker==$Rij2["MwHdrNr"]){echo "selected";}
echo ">";
echo $Rij2["MwRoepnaam"]."</option>\n";
}
}
?>
</select>So yeah, just that tiny thing.
The point of this script is that you can select a company from a first drop down box, and it will give a list of employees in a second drop down box.
If you select an employee from that list, it will give you all the information about that person from the database.
If there's a 'cleaner' way to display the employee's information after you selected him/her, please let me know.
I have a number of books around me, but I can't find what I need.
Please note: I only just started working with PHP.
I have average knowledge of HTML though.
Thanks in advance!
-knight666
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]