• Log in or sign up for an account here: https://www.sythe.org/login

Getting PHP too recognise a clicked link

DarkSpark

Vic's Whore

Retired Sectional Moderator
Joined
Jan 17, 2006
Sythe Gold
106
Messages
1,872
Location
Teh Australia Land
420 yolo swag blaze it fuck the popo legalize it anyone got some chips
Why is there BACON in the SOAP!?
Two Factor Authentication User
Well i am making a site for someone who wants minimal loading etc so what i am struggling with is i have an A - Z list, i want users too be able too just click a hyperlink and have the PHP i am using recognise that they selected that specific letter... the rest after that i can do myself...

like if they click a my PHP will have say $userSelect which is the selected letter...
 
You mean like..

#page.html
Code:
<a href="index.php?letter=a">A</a>
<a href="index.php?letter=b">B</a>
<a href="index.php?letter=c">C</a>
<a href="index.php?letter=d">D</a>

#Index.php
Code:
<?php
echo "You picked letter " . $_GET['letter'];
if ($_GET['letter] == "a")
{
      echo "you picked a";
}
?>
etc...

Did you mean that?
 
Runescape Gamblingrunescape gambling
Back
Top