I have an attendance management system, which has two tables attendance and employees. In this system, there is a page that displays the names of all employees and it is set as a hyperlink as shown below
<?php echo "<a href='attendance_add.php'>" . $row['emp_name'] . "</a> "; ?>
But I want to send employee_id to attendance_add.php page. So how do I send it?
P粉7096447002024-02-27 09:34:09
You would do something like:
<?php echo "<a href='attendance_add.php?id=".$row['employee_id']."'>" . $row['emp_name'] . "</a> ; "; ?>
You will then capture the id from the url using $_GET['id']
inside