if(!$this->emailSearch()) {
$this->orderid = 0;
return 'Not Found';
}
public function emailSearch() {
$email = $this->txndata['payer_email'];
$ordercount = dbfetch("SELECT count(orderid) FROM orders WHERE email = '$email' OR email2 = '$email'");
if($ordercount == 1) {
$this->orderid = dbfetch("SELECT orderid FROM orders WHERE email like '%$email%' OR email2 = '$email'");
return true;
}
else {
return false;
}
}
|