I’m looking to pass a keyword from a HTML page to a PHP page through the URL string.
See example below to what I’m saying:
mysite.com/index.html?keyword=Google
the “Keyword” is Google and it needs to go over to my Thank you page.
mysite.com/thankyou.php
the code I use on my “thankyou” page is:
<?php $id = $_GET['keyword']; echo $id;?>
NOTE: I’ve visited and tried the links I found on the stackflow site… but none of them seem to work (asleast from what I’ve done with them). Am I missing any other thing when it comes to the code?
How do I get the current URL and then get the last words
how can i get the url if it is like this <keyword>?
How to pass a keyword from URL but keep it hidden? (Adwords)
If you could PLEASE provide a functioning example on a http://jsfiddle.net page so I can see how it works.
You need to have the get variable on the php page url, not the index.html page.
Example:
mysite.com/thankyou.php?keyword=Google