'; echo "Check against unclaimed prizes"; echo "

Checking bond holders for email $email"; flush(); if (empty($email)) { echo ""; echo ""; exit(); } $q = "select id from holder where email = '$email'"; $res=db_query($q); $num=db_numrows($res); while ($arr=mysql_fetch_object($res)) { echo "

Checking holder $arr->id

"; flush(); $q = "update holder set tries=tries+1 where id = '$arr->id'"; db_query($q); list($a,$b,$c,$d,$ct) = get_result($arr->id); # set query for updating on successful connect # set pid =999999 to not redo this session # and sent = 'y' to not mail this session $q = "update holder set ok=ok+1,pid=999999,sent='y',ldate=now(),sent='Y' where id = '$arr->id'"; if ($a == -1) { echo " System Busy at the moment.We will try later and if you have a prize we will notify you by email"; } elseif ($a == 1) { db_query($q); echo " Sorry no prizes outstanding. We will keep checking."; } else { db_query($q); if ($ct > 1) echo " You have several outstanding wins unclaimed"; else echo " You appear to have an outstanding win unclaimed"; echo '
'; echo ''; while (list($i,$bond) = each($b)) { echo ""; } echo '
BondAmount in poundsDate
$bond$c[$i]$d[$i]
'; $found++; echo '
To confirm your prize and make sure it gets safely to you, fill in the back of your Premium Bonds Holder\'s Card with your current address and send it together with a signed letter to:
Premium Bonds
National Savings
Blackpool FY3 9YP.
The National Savings telephone number for queries is 08459 645000.
'; } flush(); echo ""; } echo "

"; echo "We will continue to check on a regular basis and notify you if a winner comes up."; echo "
Should you change your email address remember to come back and change your details"; echo "
We will send you an occasional newsletter to validate your email address. If this is returned undelivered then we will remove your details from the checking program."; form_foot(); echo ''; ?>