Page 1 of 1

Sessions: Gotta loose my hair on this... *sigh*

Posted: Fri Dec 27, 2002 1:44 pm
by derschamane
Seems to be a simple problem

First Page: Login-Form (Login, Password)
-> Second Page: Validation (Check Login and Password via MySQL-Database)
-> Third Page: Work with validatet data (login, pw in session-variables)

Read books, and your session-descriptions but nothing worked

On which page, do I have to write session_start(), where to I have to
write session_register("name","password") and how to use this on all
the following pages until session is destroyed.

By the way, I even killed Apache 1.3.27 when I tried to call the
second page with secondpage.php?session_id_very_long_nr
as described in one of this postings

Can anybody help me, so that i don't loose my last hairs :wink:

Thanx in advance
Ewald, modern.Shaman

Posted: Fri Dec 27, 2002 2:52 pm
by oldtimer
On the 3rd page is where you initialize the session. however you should have a session_start(); at the top line so when going back to the page your sessions keeps. So one they have logged in then something like

session_register("valid_user");

Then every page after this you have the session_start(); at the top.