tags:

views:

36

answers:

1

Well I have unexpected situation here. I am using a code form a site I made long time ago and it works there.

I have 3 pages:
- news.php
- newscheck.php
- newsadd.php

I have session_start() on every page. In newscheck.php, I generate session_vars for the fields and echo them in the same page so the user to check the info. And they are OK. Clicking on resume takes the user to newsadd.php where the info goes to the database but there all session vars are empty.

The most interesting is that I have session_var generate back in the login page and it is OK in all pages but the generated vars in newscheck.php are gone in the next page.

What could be the problem ?

A: 

Ensure that you have put the session_start() function in very beginning of the newsadd.php and there are no "headers already sent" warnings on that page.

shamittomar
It's there the script works on other hosting
Victor