\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } $sql = "SELECT SQL_CACHE RecordID, CountyName FROM CountyDetails WHERE CountryID != 4 ORDER BY CountyName"; $zxcf = mysql_query($sql)or mailjim("headcounties", "$sql\n".mysql_error()); $sql = "SELECT SQL_CACHE quote, famousperson, name FROM Quotes INNER JOIN famous ON famous.id = Quotes.famousperson "; if(isset($_GET['name'])){ $txt = 'Quotes'; $join = 'WHERE'; if(!empty($_GET['name']) && $_GET['name'] != 'Famous Name'){ $sql .= " WHERE name LIKE '%".mysql_real_escape_string($_GET['name'])."%' "; $join = 'AND'; $txt .= " by '{$_GET['name']}'"; } if(!empty($_GET['word']) && $_GET['word'] != 'Quoted Words'){ $sql .= " $join quote LIKE '%".mysql_real_escape_string($_GET['word'])."%' "; $txt .= " including '{$_GET['word']}'"; } } else{ $sql .= " ORDER BY RAND() LIMIT 30"; } //echo $sql; $famq = mysql_query($sql)or mailjim('fq', "$sql\n".mysql_error()); ?> Famous British Quotes.
Winston Churchill

Search Quotes:

$txt\n"; } else{ echo"

Famous British Quotes

\n"; } include'linkunit.txt'; ?>
0){ while($quot = mysql_fetch_object($famq)){ echo"

'$quot->quote'.. $quot->name

\n"; } } else{ echo"

Sorry, no matches found

"; } echo'
'; include('countypop.php'); include('footer.php'); include('statcounter.txt'); ?>