Thanks, Roger.
I have been working on this and initially the agent name in one table is broken out into first and last name, so I created variables to bring this together.
<?php $first= $row_rs_searchResults['ListingAgentFirstName']; ?> <?php $last= $row_rs_searchResults['ListingAgentLastName']; ?> <?php $fullname=$first. " ".$last;?>
I looked at the joins and this looks like a simple select from the mySQL example, so I was trying
$colname_rs_agents = "$fullname";
if (isset($SERVER['fullname'])) {
$colname_rs_agents = (get_magic_quotes_gpc()) ? $SERVER['fullname'] : addslashes($_SERVER['fullname']);
}
mysql_select_db($database_listings, $listings);
$query_rs_agents = sprintf("SELECT agent_name, email FROM Burnettagents WHERE agent_name = '%s'", $colname_rs_agents);
$rs_agents = mysql_query($query_rs_agents, $listings) or die(mysql_error());
$row_rs_agents = mysql_fetch_assoc($rs_agents);
$totalRows_rs_agents = mysql_num_rows($rs_agents);
?>
Am I close here? I know I need to get the names concatanated together before I can do any match. Now the name has been returned it should just be matching the full name variable with the full name from the recordset.
Thank you.