query($q); $d = mysqli_fetch_array($r); if ($d['VTRID'] != ''){ $VTRID = $d['VTRID']; $FIRSTNAME = $d['FIRSTNAME']; $MIDDLENAME = $d['MIDDLENAME']; $LASTNAME = $d['LASTNAME']; $ADDRESS = $d['ADDRESS']; $RESIDENTIALCITY = $d['RESIDENTIALCITY']; $COUNTY = $d['COUNTY']; $RESIDENTIALZIP5 = $d['RESIDENTIALZIP5']; }else{ header('Location: warning_not_found.php'); } echo $head; $available=''; $q2 = "SELECT * FROM petitions"; $r2 = $petition->query($q2); while($d2 = mysqli_fetch_array($r2)){ $field = $d2['eligibleVoterListField']; $pass = $d2['eligibleVoterListEquals']; $q4 = "select * from signatures where VTRID = '$VTRID' and petition_id = '$d2[petition_id]' "; $r4 = $petition->query($q4); $d4 = mysqli_fetch_array($r4); if ($d4['id'] > 0){ $available .= "
"; }elseif($d[$field] == $pass){ if($_COOKIE['invite'] != '' && $_COOKIE['invite'] == $d2['web_short_name']){ $available .= ''; $checked = 'checked'; }else{ $checked = ''; } $available .= "