Jump to content

$_GET and Cookies


tawevolution

Recommended Posts

On php5 you can extract all cookies and generate an URL-encoded query string like this:
[code]
<?php

echo "<a href='www.blah.com/read.php?".http_build_query($_COOKIE)."'>LINK</a>";

?>
[/code]

And for one cookie value alone,
[code]
<?php

echo "<a href='www.blah.com/read.php?".$_COOKIE['the_cookie_name']."'>LINK</a>";

?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/28847-_get-and-cookies/#findComment-132134
Share on other sites

[quote]<?php

echo "<a href='www.blah.com/read.php?".$_COOKIE['the_cookie_name']."'>LINK</a>";

?>[/quote]That is what i though of doing, just wanted any other ideas. THANKS xD


Oh, also, I know to send the data (Form method=get) how do i put that into a link (instead of a form). so click on an image link, which goes to www..com/index.php?lang=en
Link to comment
https://forums.phpfreaks.com/topic/28847-_get-and-cookies/#findComment-132175
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.