-2

I am very beginner in php.I need to know how to fetch the data from the url and pass it to another page using html.

http://localhost/userdetails.php?branchId=2

This is my url i need to get the value branchId=2 and pass it to next page userdetails.2php what is the syntax for this operation As a beginner am having trouble in doing that.

Tharif
  • 13,794
  • 9
  • 55
  • 77
vimal kumar
  • 75
  • 1
  • 8

1 Answers1

0

When getting parameters from url, use $_GET. So in userdetails.php, use

$_GET['branchId'];
Niranjan N Raju
  • 12,047
  • 4
  • 22
  • 41