include("dbinfo.inc");
##include database info and connect to database
$db=mysql_connect(localhost,$username,$password);
@mysql_select_db($database,$db) or die( "Unable to select database");
mysql_set_charset('utf8', $db);
if(!$_GET['id_number']) {
$id_number=htmlspecialchars($_POST['id_number'],ENT_QUOTES);
} else {
$id_number=htmlspecialchars($_GET['id_number'],ENT_QUOTES);}
echo '
';
echo '
';
#query db with new search term
$result = mysql_query("select * from 3dproject_scans where id_number = '$id_number' order by id_number ASC");
$record_cnt = mysql_num_rows($result);
echo '
';
//put all the code here for running the script itself using $result in the while loop
for ($i=0; $i<$record_cnt; $i++) {
$row = mysql_fetch_array($result);
$image=trim($row['scan_image']);
echo '