Jump to content


Photo

Gettin' the hang of $_SESSION


  • Please log in to reply
4 replies to this topic

#1 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 22 August 2006 - 07:08 PM

I've created a multi-page form that I want to have store information until the last page where it will then be entered in a DB.

The first page is a <form> that calls the second page upon submittal. 

The second page is a PHP script that validates the data then displays a java file-upload applet.  The java applet calls it's own PHP script (which I've modified for my needs).  This second page can successfully echo test variables from the $_SESSION array.  After uploading files, the user clicks a "Next" button, which is actually a submit button that loads the third and final page.

The third page will contain a confirmation number and will do three other things:  1) enter all variables into the DB, 2) email the user and the administrator, and 3) destroy the session. At this point, I am unable to echo any $_SESSION variables on the third page, but I AM able to echo them on the second page.

Do I have to do something special for the third page to acknowledge the session?  What am I missing here?

- Joe

#2 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 22 August 2006 - 07:12 PM

Are you including session_start() in that third page?  You'll need that in order to be able to access the $_SESSION variables.
What is the CoronaMatrix?

#3 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 22 August 2006 - 07:14 PM

Corona, you're the dopest!  I didn't know that!  I'll try it, thanks!

#4 jo.nova

jo.nova
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 22 August 2006 - 07:18 PM

It worked! YOU are the coolest.

#5 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 22 August 2006 - 07:32 PM

Heh... glad it worked.
What is the CoronaMatrix?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users