How to send id to another page in php?
P粉323050780
P粉323050780 2024-02-26 11:23:05
0
1
297

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粉323050780
P粉323050780

reply all(1)
P粉709644700

You would do something like:

<?php echo "<a href='attendance_add.php?id=".$row['employee_id']."'>" . $row['emp_name'] . "</a&gt ; "; ?>

You will then capture the id from the url using $_GET['id'] inside

attendance_add.php
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!