0

I want to get the value of clicked letter in PHP. For example if I click "A" in the HTML page, PHP should know that "A" is clicked. Note: all values take to the same PHP page.

<td><a href="FilmeA-Z.php" name="A">A</td>
<td><a href="FilmeA-Z.php" name="B">B</td>
  • `A` and then in php : `$_GET['letter']`. don't forget to close the `` tag – Cid Dec 11 '19 at 12:09
  • There is an example of a clicked element here, hope it helps ... https://stackoverflow.com/questions/43422248/php-get-button-post-value-when-clicked – Donada Dec 11 '19 at 12:19

1 Answers1

0

Just use $_GET in php page like :

$variable=$_GET['letter'];
echo $variable; // show "A"

In html page change url like:

<td><a href="FilmeA-Z.php?letter=A" name="A">A</td>
Simone Rossaini
  • 8,115
  • 1
  • 13
  • 34