0

Just a basic query but, at the moment I have a URL redirecting to another page like so:

"<a href='add-job.php?driver_id=" . $drive->driver_id . "". $drive->user_ID ."'>";

At the moment it only takes driver_ id to the next page. is it possible to bind another element to the url from the database such as user id?

If so, how?

Dhaval Asodariya
  • 558
  • 5
  • 19

1 Answers1

0

Add variable name you want to send with prefix &

echo " <a href='add-job.php?driver_id=" . $drive->driver_id . "&user_id". $drive->user_ID ."'>";
Sanjit Bhardwaj
  • 893
  • 7
  • 13
  • that works thanks, however upon reaching the next page, I put it into a variable like so: $login = $_GET['user_ID'];. but for some reason its saying user_id is undefined. any ideas? – James Green Jan 19 '18 at 12:33
  • check the variable name , according to this URL the variable must be $login = $_GET['user_id']; – Sanjit Bhardwaj Jan 19 '18 at 12:35