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>
2
  • <a href="FilmeA-Z.php?letter=a" name="A">A</a> and then in php : $_GET['letter']. don't forget to close the <a> tag Commented Dec 11, 2019 at 12:09
  • There is an example of a clicked element here, hope it helps ... stackoverflow.com/questions/43422248/… Commented Dec 11, 2019 at 12:19

1 Answer 1

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>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.