first i want to thank all of those who gave me suggestions on my earlier post. since the i have simplified and reworked my pages. I feel like i have done nothing more than dug a deeper whole for myself. i have 2 pages, the first is used to do a search the second is used to display the results. But i seem to be doing something wrong. the search page lists the data in my database, but i don't think it is pass the query on to the second page. can some one take a look and see what i
have screwed up ?

<!-- search.php -->
<HTML>
<HEAD>
<TITLE> Employee Profiles </TITLE>
</HEAD>
<BODY>
<H1> Employee Profiles </H1>
<?php

$dbcnx = @mysql_connect("localhost", "root", "password");
mysql_select_db("EmployeeProfiles");

$employees = mysql_query("SELECT ID, Name FROM employees");
$bizs = mysql_query("SELECT ID, bgroup FROM employees");
?>

<FORM ACTION="search.php" METHOD=POST>
<P>View Employees:<BR>
By Employee:
<SELECT NAME="aid" SIZE=1>
<OPTION SELECTED VALUE="">Any Employee
<?php
while ($employee = mysql_fetch_array($employees)) {
$eid = $employee["ID"];
$ename = $employee["Name"];
echo("<OPTION VALUE='$eid'>$ename\n");
}
?>
</SELECT><BR>
By Business Group:
<SELECT NAME="bid" SIZE=1>
<OPTION SELECTED VALUE="">Any Business Group
<?php
while ($biz = mysql_fetch_array($bizs)) {
$bid = $biz["ID"];
$bname = $biz["bgroup"];
echo("<OPTION VALUE='$bid'>$bname\n");
}
?>
</SELECT><BR>
<!-- Containing Text: <INPUT TYPE=TEXT NAME="searchtext"> --><BR>
<INPUT TYPE=SUBMIT NAME="submit" VALUE="View">
</FORM>
<BR>
</BODY>

</html>

<!-- results.php -->
<HTML>
<HEAD>
<TITLE> employee information</TITLE>
</HEAD>
<BODY>
<H1>Manage Jokes</H1>
<P><A HREF="search.php">New Search</A></P>
<?php

$dbcnx = @mysql_connect("localhost", "root", "password");
mysql_select_db("employeeprofiles");

// The basic SELECT statement
$select = "SELECT DISTINCT name, bgroup";
$from = " FROM employees";
$where = "$names = $name["name"];
"$bgroups = $bgroup["bgroup"];
}
?>

<TABLE BORDER=1>
<TR><TH>Name</TH><TH>Position</TH><TH>Extention</TH><TH>Birthday</TH><TH>Home Address</TH><TH>Home Phone</TH><TH>Business Group:</TH></TR>

<?php
$employees = mysql_query($select . $from . $where);
if (!$employees) {
echo("</TABLE>");
echo("<P>Error retrieving employees from database!<BR>".
"Error: " . mysql_error());
exit();
}

while ($employee = mysql_fetch_array($employees)) {
echo("<TR>\n");
$name = $employee["Name"];
$postition = $employee["Position"];
$extention = $employee["Extention"];
$birthday = $employee["Birthday"];
$homeaddress = $employee["HomeAddress"];
$homephone = $employee["HomePhone"];
$bgroup = $empployee["bgroup"];
echo("<TD>$name</TD>\n");
echo("<TD>$position</TD>\n");
echo("<TD>$extention</TD>\n");
echo("<TD>$birthday</TD>\n");
echo("<TD>$homeaddress</TD>\n");
echo("<TD>$homephone</TD>\n");
echo("<TD>$bgroup</TD>\n");

}
?>

</TABLE>
</BODY>
</html>




------------------
bl@cky