if ($_REQUEST['eml_code']) {
$code = mysql_escape_string($_REQUEST['eml_code']);
$q = "Select * from glist_EmailMailings where eml_code like '%${code}%'";
$query = mysql_query($q) or die(mysql_error());
$r = mysql_num_rows($query);
if ($r == 0) {
echo "No email found with that code";
} elseif ($r > 50) {
echo "More than 50 results found";
} else {
echo "";
echo "Email Address | Code |
";
while ($row = mysql_fetch_array($query)) {
echo "" . $row[eml_email] . " | " . $row[eml_code] . " |
";
}
echo "
";
}
}
?>