Thank you both very much for your replies.
Thank you r937 for the lesson. I did get it to work with the following modifications. I will post incase it might help someone else.
PHP Code:
$county='Montgomery County';
$escaped_county=mysql_real_escape_string($county);
mysql_select_db($database_alphabb, $alphabb);
$query_Recordset1 = "SELECT
logo
, law_firm
, fname
, mint
, lname
, street
, city
, state
, zip
, phone
, url
FROM
attorney
WHERE '$escaped_county' IN ( county, county_2, county_3 )";
$Recordset1 = mysql_query($query_Recordset1, $alphabb) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
And the loop
PHP Code:
$counter = 0;
$max = 3;
while ($row_Recordset1 !="") { // Show if recordset not empty
$counter++;
do {
echo '<br />';
echo "$row_Recordset1[logo]".'<br />';//look this up
echo '<h4>'. "$row_Recordset1[law_firm]".'</h4>';
echo '<h5>'. "$row_Recordset1[fname]" . " $row_Recordset1[mint] " . " $row_Recordset1[lname]". ' ESQ'.'</h5>'.'<br />';
echo "$row_Recordset1[street]".'<br />'
. " $row_Recordset1[city]"
. " $row_Recordset1[state]"
. " $row_Recordset1[zip]";
echo '<br /><br />';
echo "$row_Recordset1[phone]".'<br />';
echo "<a href=$row_Recordset1[url]>".' Law Firm Web Site'.'</a>'.'<br />';
echo '<hr />';
}while ($row_Recordset1 = mysql_fetch_array($Recordset1));
?>
<?php } // Show if recordset not empty ?>
Space Phoenix, your loop was a little thicker than I was used to and I was not able to get it to work.
Again, thank you both for your help.
Gary
Bookmarks