-2

I have attendance management system in which two tables attendance and employees. In this system a page that display all names of employees and make this as hyperlink 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 can i send?

  • 2
    Possible duplicate of [PHP Pass variable to next page](http://stackoverflow.com/questions/871858/php-pass-variable-to-next-page) – kunicmarko20 Mar 30 '16 at 16:31

1 Answers1

1

You would do something like :

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

and then you will catch id from url with $_GET['id'] inside of attendance_add.php

kunicmarko20
  • 2,045
  • 2
  • 14
  • 25