• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

PHP Session Forcing it to use cookies

Is there a way to force a PHP session to use cookies as opposed to just passing around the session id?  I'm not the administrator of the server, so i'm looking for a solution i can do right out of the php code.  

0
ldsnerd
Asked:
ldsnerd
1 Solution
 
j_chakravertyCommented:
[1] method 1
set a cookie using a php header function
example
header(cookiename=cookievalue, expires= saturday, 05-feb-00 22:03:38 GMT; path=/;domain=yourdomain.com);

[2] method 2 recommended is using set cookie
example
setcookie( "variable name", "variable value", time()+3600. "/", "domain name",o);

check out php help for setcookie u can delete a cookie by same function and no value setcookie("variable name")
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now