Hey guys, since I've been told to drop MS access and use MySQL for a website based database, I decided to try it out and have been making some good progress, however I've come to a halt when trying to create a PHP drop down that filters through my simple table.

My table consists of 3 columns; Id, FirstName, and LastName. I want the drop down menu to filter through last names, as I have created fake names using 2 of the same last names(John Doe, Tim Doe, Bob Doe, Jim Earl, Tom Earl, etc).

Basically, my goal is for the drop down to have 3 options; All (The default option and display, which shows all names), Doe (Only display names with LastName equal to Doe), and finally Earl(Only display names with LastName equal to Earl).

The most I could come up with currently, is a drop down that displays the values of "FirstName" from my table, but again, it's not what I'm trying to do ;/

Here is the code currently;

Code PHP:
//some code, connecting to database, etc
$result = mysql_query("SELECT * FROM names");
print "<p>Select A First Name: \n";
print "<select name=\"Id\" > \n";
while ($row = mysql_fetch_array($result)){
		$Id = $row['Id'];
		$FirstName = $row['FirstName'];
		print "<option value=$Id>$FirstName\n";
print "</select>\n";
print "</p>\n";

I know that's probably know where near how I'm suppose to code the drop down with submit values to search the table, but it's the closest I could come up with using my current knowledge.

Any ideas?