Pass href attributes of links to php variable using $_GET not working
-
I’m trying to pass the href attributes of two links to php variable using $_GET.
The code is quite simple, but it’s not working in wordpress:<a href="?link=time">Time</a> <a href="?link=function">Function</a> <?php $childof= 4; if(isset($_GET['link'])){ $link=$_GET['link']; if ($link == 'function'){ $childof= 9; } elseif ($link == 'time'){ $childof= 4; } } ?>
I’ve already installed WordPress Registry plugin, but $_GET is still not working at all. Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pass href attributes of links to php variable using $_GET not working’ is closed to new replies.