html - When a user clicks on a link, how can I send a php variable to that new page -


What am I trying to do:

  • Click on the table in the form (loaded with SQL)
  • When they click on a site, the user is sent to venue.page.php
  • What is the primary key of the location is clicked on

I have tried to use the $ session variable but there is no luck yet. Here's my code:

  & lt; Td id = "startAt" & gt; & Lt; A href = "clubPage.php" onClick = "& lt ;? Php $ _SESSION ['Current VenueId'] = $ placeID;? & Gt;" & Gt; & Lt; P & gt; & Lt ;? Php echo $ venue; ? & Gt; & Lt; / P & gt; & Lt; / A & gt; & Lt; / TD & gt;  

Currently I resonate $ _ session ['currentVenueId'] and the result is not updated.

Any help would really be appreciated! Thank you in advance!

You can try:

   

=>

  & lt; Td id = "startAt" & gt; & Lt; A href = "clubPage.php? LocationID = & lt ;? php $ _SESSION ['current VenueId'] = $ spaceID ;; & gt; & Gt;  

and in clubPage.php you get value with $ placeId = $ _GET ['placeId']

Can

Comments