Library Loans

conn); while($loanarray = mysql_fetch_array($latequery)){ $querytwo = "SELECT first_name, last_name FROM customers WHERE id='$loanarray[userID]'"; $listquery = mysql_query("$querytwo",$dbf->conn); echo mysql_error(); while($latearray = mysql_fetch_array($listquery)){ $dayslate = round((($todaynix-$loanarray[unixdate])/60/60/24)-1, 0); if ($dayslate < 0){ $dayslate = abs($dayslate) . " days remaining"; $latestyle = ""; } elseif ($dayslate == 0){ $dayslate = "Due today"; $latestyle = "background: yellow;"; } else {$dayslate .= " days late!"; $latestyle = "background: red;"; } echo "
$latearray[first_name] $latearray[last_name] [?]
($dayslate) [Info +/-]"; $details = ""; $details .= "This bike (#$loanarray[bikeID]) was taken out on "; $details .= date('M. j, Y',$loanarray['unixloan']); $details .= " and is/was due back on "; $details .= date('M. j, Y',$loanarray['unixdate']); $details .= ""; $details .= " || Sign Bike IN "; echo "
$details
"; echo "
"; } } ?>