Trying to grab "?what=ever" from query url
How can I from client side "page.htm" link to server side "adid.php" and make the var "$adid" and it's value usable in "page.htm"? Trying to grab
"?adid=???" from linking url without using cookie.
page.htm
<html><head></head>
<body>
<a href=........
or
<script language=javascript.......
or
<how ever.......
</body></html>
adid.php
<html><head>
<?php
$adid=$_GET['adid'];
?>
</head><body>
</body></html>
Thanks for your help to a real newbie!!
[b]Trying to grab "?what=ever" from query url[/b]
Moderator: General Moderators
jimrains,
in your page.htm simply setup a standard hyperlink but with a query on the end like so:
<a href="adid.php?adid=test123">example</a>
now in your adid.php add an extra line in your php to display the value you parsed like so:
hope this helps
in your page.htm simply setup a standard hyperlink but with a query on the end like so:
<a href="adid.php?adid=test123">example</a>
now in your adid.php add an extra line in your php to display the value you parsed like so:
Code: Select all
<?php
$adid=$_GET['adid'];
echo $adid;
?>Thanks, let me re-phrase my question. From an client side .htm how do I grab url variables? (ie: -http://anypage.com?adid=100). Need to use php on server side.
Maybe what I'm trying to do can't be done.
Thanks

Maybe what I'm trying to do can't be done.
Thanks
hi,
I am a bit confused do you mean that you want to parse variables to html files like this?
http://www.domain.com/test.htm?adid=test123
please clarify jim.
I am a bit confused do you mean that you want to parse variables to html files like this?
http://www.domain.com/test.htm?adid=test123
please clarify jim.
Yes. Let's say my main web page is, from your example ../test.htm. I need ?adid=test123 accessiable to../test.htm. I understand I have to use server side code to parse the variable ?adid=test123, what I do not understand is how to make ?adid=test123 accessiable to ../test.htm.
I'm such a newbie at all of this I hope I'm not confusing you even more.
I'm such a newbie at all of this I hope I'm not confusing you even more.