Forum Moderators: coopster
sample?id=fr-fr
and a id = "fr-fr"
are entirely different and unrelated things. The first form is an "id" parameter whose value happens to be "fr-fr". The second form is an HTML attribute pertaining to some element on a page. Last night I came across a comment from another forum site that noted that one could populate a $_SESSION var using an anchor tag's "name" attribute and $_REQUEST['name'].
...what php function can I use (if any) to grab the id attribute when a link is clicked?
<form action="sample" method="post">
<input type="hidden" name="lang" value="fr-fr">
<input type="submit" name="submit" value="test">
</form>
if (isset($_POST['lang'])) {
echo 'lang = ' , $_POST['lang'];
} else {
echo 'lang is not set';
}