$_GET in WordPress
-
Hi there,
I build a Landing Page in WordPress for a Tell-A-Friend-campaign. This page should include sth. like “See, what <firstname> found:”. The first name placeholder should be dynamically replaced with a name given by the web address. For example, if I open the address domain.com/tellafriend?firstname=Melanie should print the text “See, what Melanie found:”.
These are the solutions I tried, which didn’t work:
<?php if(isset($_GET[‘firstname’])) echo strip_tags($_GET[‘firstname’]); ?>
and
<?php echo get_query_var(‘firstname’); ?>Is there any way to print out parameters?
Thanks a lot for your help,
Katy
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘$_GET in WordPress’ is closed to new replies.