'; if ($action) { $errfound = 'N'; if (!$email) { fault("You did not enter your Email address"); } else { if (!email_ok($email)) { fault("Badly formed Email address"); } } if (!empty($amail) AND !email_ok($amail)) { fault("Badly formed Copy to Email address"); } if ($oldem != $email) { # new email entered $q="select count(*) as ct from holder where email = '$email'"; $res=db_query($q); $ct=db_result($res,0,"ct"); if ($ct > 0) { echo "
"; fault("This Email address is already registered. You should use the amend details form."); echo "

Click here to use the amend details form

"; exit; } } if ($oldem) { # now remove old ones to allow following # check to work ok. db_query("delete from holder where email = '$oldem' and pass = '$oldps'"); } for ($i = 0;$i < count($hold); $i++) { if (empty($hold[$i])) continue; $holder = convert_holder($hold[$i]); $stat = validate_holder($holder); if ($stat != 0) { $err[$i] = $stat; $errfound = "Y"; } $q="select count(*) as ct from holder where id = '$holder'"; $res=db_query($q); $ct=db_result($res,0,"ct"); if ($ct > 0) { $err[$i] = 9; $errfound = "Y"; } $hct++; } if ($hct == 0) { if ($oldem) fault("All entries now removed"); else fault("Enter at least one holder number"); } if ($errfound == 'Y') { fault("Please Correct the errors and resubmit"); unset ($action); } } if (!$action) { include "enter.inc"; exit; } for ($i = 0;$i < count($hold); $i++) { if (empty($hold[$i])) continue; $holder = convert_holder($hold[$i]); db_query("insert into holder (id,pass,email,amail) values ('$holder','$passa','$email','$amail')"); $added = 'Y'; } ?> Your entry is now updated for email $email"; echo "

We will send you an email confirming your submission."; echo "

Should you not receive this you might need to come back and check that your email address is correct."; $mes2="You have been registered and we will check against the unclaimed prize list for you on a regular basis\n\nPLEASE do not reply to this as this is an automated service and replies are not read."; mail ("$email","Bullnet Premium Bonds - Registered","$mes2"); if ($amail) mail ("$amail","Bullnet Premium Bonds - Registered","$mes2"); echo "


"; if ($added != 'Y') { echo "
No records were added"; } $mess = "You might find this site of some interest\n\n"; $mess .= "http://www.prizefinder.co.uk - Free Unclaimed Premium Bonds Checker\n"; $fr1 = $Friends_email_address_1; if (isset($fr1) && $fr1 != "") { if (email_ok($fr1)) { mail ($fr1,"Unclaimed Premium Bonds",$mess,"From: $email"); } } $fr2 = $Friends_email_address_2; if (isset($fr2) && $fr2 != "") { if (email_ok($fr2)) { mail ($fr2,"Unclaimed Premium Bonds",$mess,"From: $email"); } } if ($added == 'Y') { echo "
We will check against unclaimed prizes on a regular basis and keep you informed by email if and only if you are on the list."; echo "
Meanwhile you can
Click Here to check against the unclaimed prize list Now"; } ?>