Passing form data

when i tried to pass the form data from one page to another for confirmation to user entered data before inserting into database it is not displayed.
I use session variables also, but it shows some error like:
“Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled.”

Is there any solution for this?

reply to me.

I am not sure of the explanation, but the original poster has thanked the answers.
You can see it at:

basically you have a variable with the same name as your session. ex:
$_SESSION[‘var1’] = null;
$var1 = ‘something’;

which will reproduce this error. you can stop PHP from trying to find existing variables and warning you about them by adding these lines to your script:
ini_set(‘session.bug_compat_warn’, 0);
ini_set(‘session.bug_compat_42’, 0);

these values can be set in php.ini or .htaccess as well

It is a strange one yes. There’s two solutions I think:

  1. The message should also give you the names of the ini settings to stop this. If you turn them off that will stop the message.

  2. Do not name global variables with the same name as session values. If you have $_SESSION[‘some_var’] and then $some_var, this will cause the error. Changing one or the other will stop this.