Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session vs. cookies

Status
Not open for further replies.

DBAFrog

Programmer
Sep 26, 2002
61
US
Does anyone have a tutorial or FAQ for setting up a cookie to store SESSION variables?

I cannot get the session variables to work on my testing area. Does SESSION require a web server to process ? I am testing my site work locally.

I need to pass a number of variables across a 5 step website for users to complete a form. I'd rather not dump the data to a DB for each step for performance reasons, but I can't get ASP or PHP to process SESSION variables.

Any suggestions appreciated.

B.

P.S. Does ASP page require a SESSIONENABLED tag at the top? if so, what is the syntax.
 
sessions and cookies are 2 seperate things -- a session variable is held on the server and expires once you close it or if the browser is closed. a cookie can be stored on a persons computer and the values from it can be pulled whenever you want -- either they can delete the cookies or you can kill them. in php you would use session as such

session_start();
$variable= "1";
session_register("variable");

and then to end it

session_start();
session_unregister("variable");

but in your case it would be form data that you are posting?

session_start();
$variable= $HTTP_POST_VARS['fieldname'];
session_register("variable");

but someone should check my syntax as i am still learning this stuff as well.

Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
 
Thank you,

This got me going with a .php file that worked


B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top