include "common.inc"; echo '
';
if ($action)
{
$em = $email;
$err = "You must make an entry in both fields";
if (strlen($email) < 6)
unset($em);
if (!empty($em) AND !empty($passa) AND !empty($holder))
{
$q="select * from holder where id='$holder' and email like '$em%' and pass = '$passa'";
}
elseif (!empty($em) AND !empty($passa))
{
# first check for no duplication
$pq="select distinct(email) as ct from holder where pass='$passa' and email like '$em%'";
$res=db_query($pq);
$num=db_numrows($res,0,"ct");
if ($num > 1)
{
$err= "Too many entries($num) matched that combination Enter a longer email address"; unset ($q); } else { $q="select * from holder where pass='$passa' and email like '$em%'"; } } elseif (!empty($em) AND !empty($holder)) { $q="select * from holder where id='$holder' and email like '$em%'"; } elseif (!empty($passa) AND !empty($holder)) { $q="select * from holder where id='$holder' and pass = '$passa'"; } if ($q) { $res=db_query($q); $num = db_numrows($res); if ($num < 1) $err= "No details matched those entries Check that your entry is correct"; else { unset($err); # get all holders with that email $hr = mysql_fetch_object($res); $q="select * from holder where email = '$hr->email'"; $res=db_query($q); } } if ($err) { if ($email AND strlen($email) < 6) $err = "Email to be at least 6 characters"; fault($err); unset($action); include "mod.inc"; exit; } $i=0; while ($hr = mysql_fetch_object($res)) { if (empty($oldem)) { $email=$hr->email; $oldem=$hr->email; } if (empty($oldps)) { $passa=$hr->pass; $passb=$hr->pass; $oldps=$hr->pass; } if (empty($amail)) $amail=$hr->amail; $hold[$i] =$hr->id; $i++; } include "enter.inc"; echo ' |