Forum Moderators: coopster

Message Too Old, No Replies

PHP , $_SESSION doesn't work

         

ruiv76

11:42 am on Oct 21, 2004 (gmt 0)



i cant't save variables from one php page to another despite i use the session_start and $_SESSION functions. Can anyone help me please?

coopster

12:20 pm on Oct 21, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, ruiv76!

Have you tried any simple examples to start with?

Create a script which starts the session and displays a form. Submit the form to a new page/script which will read your session variables and display them in the browser.

Start simple to get a feel for how it works. Don't try to get complex until you nail the basics down. See this PHP manual page on session_start() [php.net] for a simple example.

hfwd

6:23 pm on Oct 21, 2004 (gmt 0)

10+ Year Member



session_start() *HAS* to be the *very first* line in the file. This is a common error. See if it works.