| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
I like Iced Tea
|
Posting SESSION Info
Hey. I have wrote a whole bunch of php PHP Code:
which stores all this information as cookies for a multipaged form. On the second page of the form it takes the previous data from the first page and emails it to my email. It then sends the person who inputed the data to another page. I want to post the data he or she wrote on that page. But I cant seem to make it work. Example - Your first name is: $fname I tired working with PHP Code:
any help is appreciated. thanks |
|
|
|
|
|
#2 (permalink) | |
|
shiro
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,688
|
A couple points. First, you have to start the session on any page where you will set cookies, and any page where you will retrieve them, using this: Code:
If you aren't doing this, your sessions wont be set on pages where you set the, and wont be retrievable on pages where you retrieve them. Next, dont use $_REQUEST["fname"] to retrieve the session variable, use the same code you used to set them: Code:
As a side point, this: Quote:
Isn't exactly correct. You aren't storing them as cookies, you are storing them as session variables. I think you probably just got the terminology mixed up, but they are two different things. Cookies are stored on the user's machine. Session variables are stored on the server, and an ID number that refers to that session is stored on the users machine. |
|
|
![]() |