//case for database search
case "Search":
if(isset($firstname, $lastname)){
mysql_select_db("webuser23", $dbc);
$result = "SELECT * FROM customers WHERE firstname='.$firstname.' ";
mysql_query($dbc);
echo "<table border='1'>";
echo "<tr>";
echo "<th>Firstname</th>";
echo "<th>Lastname</th>";
echo "<th>Phone</th>";
echo "<th>Address</th>";
echo "<th>City</th>";
echo "<th>State</th>";
echo "<th>Zip</th>";
echo "</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['firstname'] . "</td>";
echo "<td>" . $row['lastname'] . "</td>";
echo "<td>" . $row['phone'] . "</td>";
echo "<td>" . $row['address'] . "</td>";
echo "<td>" . $row['city'] . "</td>";
echo "<td>" . $row['state'] . "</td>";
echo "<td>" . $row['zip'] . "</td>";
echo "</tr>";
echo "</table>";
}
if (!mysql_query($result, $dbc))
{
die('Error: ' . mysql_error());
}
mysql_close($dbc);
}
break;
//I only see the table headers, but i cannot see the row with database values. Please help.