- Joined
- Oct 24, 2020
- Posts
- 818
- Solutions
- 3
- Reaction
- 299
- Points
- 392
Gusto ko sana isang result lang maidisplay
eto yung code
<?php
include('connect.php');
$display = $con->prepare("SELECT * FROM tbl_personnel ORDER BY per_id ASC");
$display->execute();
$fetch = $display->fetchAll();
foreach($fetch as $key => $row) {
$bday = $row["per_date_of_birth"];
$date = new DateTime($bday);
$now = new DateTime();
$difference = $date->diff($now)->format('%y');
$length = $date->diff($now)->format('%y');
?>
<td class="hidden"><?php echo $row['per_id']; ?></td>
<td><?php echo $row['per_lastname'].", ".$row['per_firstname']." ".$row['per_middlename']; ?></td>
<td><?php echo $difference;?></td>
<td><?php echo $row['per_gender']; ?></td>
<td><?php echo $row['per_status']; ?></td>
<td><?php echo $row['per_address']; ?></td>
<td><?php echo $row['per_date_of_birth']; ?></td>
<td><?php echo $row['per_place_of_birth']; ?></td>
<td><?php echo $row['per_contact_no']; ?></td>
<td><?php echo $row['per_eligibility']; ?></td>
<td><?php echo $row['bs_name']; ?></td>
<td><?php echo $row['ms_name']; ?></td>
<td><?php echo $row['dr_name']; ?></td>
<td><?php echo $row['per_plantilla_no']; ?></td>
</tr>
<?php
} ?>
</tbody>
eto yung code
<?php
include('connect.php');
$display = $con->prepare("SELECT * FROM tbl_personnel ORDER BY per_id ASC");
$display->execute();
$fetch = $display->fetchAll();
foreach($fetch as $key => $row) {
$bday = $row["per_date_of_birth"];
$date = new DateTime($bday);
$now = new DateTime();
$difference = $date->diff($now)->format('%y');
$length = $date->diff($now)->format('%y');
?>
<td class="hidden"><?php echo $row['per_id']; ?></td>
<td><?php echo $row['per_lastname'].", ".$row['per_firstname']." ".$row['per_middlename']; ?></td>
<td><?php echo $difference;?></td>
<td><?php echo $row['per_gender']; ?></td>
<td><?php echo $row['per_status']; ?></td>
<td><?php echo $row['per_address']; ?></td>
<td><?php echo $row['per_date_of_birth']; ?></td>
<td><?php echo $row['per_place_of_birth']; ?></td>
<td><?php echo $row['per_contact_no']; ?></td>
<td><?php echo $row['per_eligibility']; ?></td>
<td><?php echo $row['bs_name']; ?></td>
<td><?php echo $row['ms_name']; ?></td>
<td><?php echo $row['dr_name']; ?></td>
<td><?php echo $row['per_plantilla_no']; ?></td>
</tr>
<?php
} ?>
</tbody>
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.