'; echo ''; echo ''; echo 'Lost Registration'; include 'head.txt'; echo ''; include 'menu.txt'; if (!isset($_REQUEST['email'])) { include 'lostv9.txt'; include 'Footer.txt'; exit(); } $email = $_REQUEST['email'] ; $name = "fred smith"; $serial = "abcde1234"; $email_pattern = '/^[a-zA-Z0-9\.\+_-]+\@(\[?)[a-zA-Z0-9\-\.]+'.'\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/'; // $email_pattern = '/^[^@s]+@([-a-z0-9]+.)+[a-z]{2,}$/i' ; echo'Lost Registration'; echo'
'; echo'

Lost Registration '; if (!preg_match($email_pattern, $email)) { echo' - Woops!

'; echo ''; echo '
'; echo 'The email address you have entered is not formatted correctly. You probably hit the wrong key on the keyboard. Click on the go back button in your browser or click here to try again '; echo '
'; } else { // $clean = SQLite3::escapeString($email) ; $db = new PDO("sqlite:db3/v9.db3"); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "Select * from master where memail = :email limit 1"; $stmt = $db->prepare($sql); $stmt->bindParam(':email',$email ); $stmt->execute(); $res = $stmt->fetchAll(PDO::FETCH_ASSOC); $rows = count($res); foreach($res as $row) { $cid = $row['mno']; $cname = $row['mname']; $cemail = $row['memail']; $cval = $row['mupval']; echo $cid; } if ($rows > 0) { // mail( $email, "GSAK lost Registration details", $msg, "From: clyde@gsak.net" ); // $msg = "" . $email . "" . $msg; mail( "register@gsak.net", "GSAK lost Registration details - lostv9=$cid", $msg, "From: clyde@gsak.net" ); echo' - Found! '; echo ''; echo '
'; echo "The email address $email was found in the registration database and an email has been sent to you with your registration details"; echo '
'; } else { echo' - Woops! '; echo ''; echo '
'; echo "The email address $email was not found in the registration database." . 'Click on the go back button in your browser or click here to try again '; echo '
'; } } include 'Footer.txt'; ?>