Hi folks. please tell me what is wrong with this code.
-----------------------------------------------------
<?php
//Open a new connection to the MySQL server
require_once "getprerentdb.php";
//MySqli Select Query
$results = $mysqli->query("SELECT * FROM waitlist");
echo "<center>";echo date('m/d/y');echo "</center>";
?>
<!DOCTYPE html><html>
<head></head>
<body><center>
<h3>515 Certification Expiration Report: 06/22/2020 - 06/22/2021</h3>
<table border='1' cellpadding="4">
<thead>
<tr>
<th colspan=2></th>
<th>movein</th>
<th>effect</th>
<th>expire</th>
<th>days</th>
<th colspan=3>recertification notification</th>
<tr>
<th>unit#</th>
<th>resident name</th>
<th colspan=3>date</th>
<th>left</th>
<th>90 day</th>
<th>60 day</th>
<th>30 day</th>
</tr>
</thead>
<tbody>
<?php
/* -------------------------------------------------------------- */
while($row = mysqli_fetch_array($results)) {
/* -------------------------------------------------------------- */
?>
<tr>
<td><?php echo $data['unit']; ?></td>
<td><?php echo $data['tenant']; ?></td>
<td><?php echo $data['moveindate']; ?></td>
<td><?php echo $data['effdate']; ?></td>
<td><?php echo $data['expdate']; ?></td>
<td><?php echo $data['daysleft']; ?></td>
<td><?php echo $data['90date']; ?></td>
<td><?php echo $data['60date']; ?></td>
<td><?php echo $data['30date']; ?></td>
<td><?php echo $data['late']; ?></td>
<td><?php echo $data['comments']; ?></td>
<td><?php echo $data['paidsum']; ?></td>
</tr>
<?php
}
?>
</tbody></table></center></body></html>
----------------------------------------------------------
result:
03/15/21
515 Certification Expiration Report: 06/22/2020 - 06/22/2021
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\property\certlog.php on line 39
movein effect expire days recertification notification
unit# resident name date left 90 day 60 day 30 day
-----------------------------------------------------
<?php
//Open a new connection to the MySQL server
require_once "getprerentdb.php";
//MySqli Select Query
$results = $mysqli->query("SELECT * FROM waitlist");
echo "<center>";echo date('m/d/y');echo "</center>";
?>
<!DOCTYPE html><html>
<head></head>
<body><center>
<h3>515 Certification Expiration Report: 06/22/2020 - 06/22/2021</h3>
<table border='1' cellpadding="4">
<thead>
<tr>
<th colspan=2></th>
<th>movein</th>
<th>effect</th>
<th>expire</th>
<th>days</th>
<th colspan=3>recertification notification</th>
<tr>
<th>unit#</th>
<th>resident name</th>
<th colspan=3>date</th>
<th>left</th>
<th>90 day</th>
<th>60 day</th>
<th>30 day</th>
</tr>
</thead>
<tbody>
<?php
/* -------------------------------------------------------------- */
while($row = mysqli_fetch_array($results)) {
/* -------------------------------------------------------------- */
?>
<tr>
<td><?php echo $data['unit']; ?></td>
<td><?php echo $data['tenant']; ?></td>
<td><?php echo $data['moveindate']; ?></td>
<td><?php echo $data['effdate']; ?></td>
<td><?php echo $data['expdate']; ?></td>
<td><?php echo $data['daysleft']; ?></td>
<td><?php echo $data['90date']; ?></td>
<td><?php echo $data['60date']; ?></td>
<td><?php echo $data['30date']; ?></td>
<td><?php echo $data['late']; ?></td>
<td><?php echo $data['comments']; ?></td>
<td><?php echo $data['paidsum']; ?></td>
</tr>
<?php
}
?>
</tbody></table></center></body></html>
----------------------------------------------------------
result:
03/15/21
515 Certification Expiration Report: 06/22/2020 - 06/22/2021
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\property\certlog.php on line 39
movein effect expire days recertification notification
unit# resident name date left 90 day 60 day 30 day