////////////////////// //rm //address if($ad) { //tbl1.st == tbl2.id //ab abbreviation //con.st == state.id (5 gives CA state.ab) //query $qstateid = "SELECT ab FROM state WHERE state_id='$st'"; //send the query to the db //result $rstateab = mysql_query($qstateid, $db) or mysql_error(); while ($d = mysql_fetch_array($rstateab)) { //state abreviation CA $stab = $d[ab]; } //echo "  $ad   $ci, $stab $zi $cn\n"; } //end rm /////////////////////