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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.