Chevy Posted December 24, 2007 Share Posted December 24, 2007 Is it possible for a person to put a cookie in a tag like this. <b onclick="document.location.href='http://google.com' javascript: document.cookie">hello</b> Link to comment https://forums.phpfreaks.com/topic/83061-cookies-in-url/ Share on other sites More sharing options...
phpQuestioner Posted December 24, 2007 Share Posted December 24, 2007 do it like this: <b onclick="javascript:document.cookie='my2007cookie=hello; expires=Tue, 1 January 2008 05:00:00 UTC; path=http://www.mywebsite.com'; javascript:document.location.href='http://www.google.com'; return true">hello</b> Link to comment https://forums.phpfreaks.com/topic/83061-cookies-in-url/#findComment-422600 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.