Hey guys,
I'm trying to figure out how to perform an action when a link is pressed. I know how to use the isset function with Form buttons, but I don't know how to do it with links. Is it possible?
| SitePoint Sponsor |


Hey guys,
I'm trying to figure out how to perform an action when a link is pressed. I know how to use the isset function with Form buttons, but I don't know how to do it with links. Is it possible?


Parameters passed in the query string of a URL are populated in the $_GET superglobal.
Clicking this link:
http://www.example.com/example.php?name=Dan
Would be the equivalent of doing the following in example.php
You could test if the name was sent in to example.php with isset again:PHP Code:$_GET['name'] = "Dan";
PHP Code:if (isset($_GET['name'])) {
echo "Hello, " . $_GET['name'];
} else {
echo "Hello, guest";
}
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.


Thanks. I was aware of that. However, I overlooked it. Thanks
Bookmarks