NewGuy21 Posted May 10, 2007 Share Posted May 10, 2007 Ok so say I have this is the cookie after its set (this is example cookie from Firefox) name:user Content:123456-%64%69%72%74%79%73%70%61%63%65%77 Domain:.domain.com Path: / Send For:any type of connection Expires: when browser is closed So how would I go about adding that info using set cookie. I wanted a before and after that way its easier to understand. I have tried this code thinking it should work <?php setcookie('user', '123456-%64%69%72%74%79%73%70%61%63%65%77', false , '/', '.domain.com', 0); ?> But that doesnt work I know how to set a regular cookie.. But am having problem with this being a session cookie. Best I can figure all you do is set the time to 0 or False and it should go away once browser is closed. I would appreciate any help can give Quote Link to comment https://forums.phpfreaks.com/topic/50762-php-set-cookie/ Share on other sites More sharing options...
PC Nerd Posted May 10, 2007 Share Posted May 10, 2007 ok..... simply ,dont add the stuff thats specific..... i dont see why you would bneed to specify the browser type, and if its only used for the one browser, then why do you need to specify the domain etc.? all you need is name = value, and thats it...... if you want a cookie that expires, when someone logs out, then simply put in a system where if theyve been in for 20 minutes, get then to login again, this also helps to aviod auto scripts etc. if you ned more help, lets me know Quote Link to comment https://forums.phpfreaks.com/topic/50762-php-set-cookie/#findComment-249595 Share on other sites More sharing options...
NewGuy21 Posted May 10, 2007 Author Share Posted May 10, 2007 I dont understand what your saying? I mean I only grabbed that as an example. So I show the output of the code. And have someone show me exactly how I would get that output. And the whole reason is to learn. I would just like to know exactly what code I would need to give me that exact output. To be honest your answer really doesnt help at all. But thank your for the suggestion. Quote Link to comment https://forums.phpfreaks.com/topic/50762-php-set-cookie/#findComment-249666 Share on other sites More sharing options...
NewGuy21 Posted May 15, 2007 Author Share Posted May 15, 2007 Bump cant someone help me? Quote Link to comment https://forums.phpfreaks.com/topic/50762-php-set-cookie/#findComment-253385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.