You're probably right. The header() call will not function after the output from the error report was sent. Prepend the _set_cookie() call with the @ operator.
Printable View
You're probably right. The header() call will not function after the output from the error report was sent. Prepend the _set_cookie() call with the @ operator.
I found the problem. The issue of the session variables has changed between php 3.X and 4.4 with further changes into 6.0. Just can't use things the same way because:So, it looks like I need to change fromCode:session_register() accepts a variable number of arguments, any of which can be either a string holding the name of a variable or an array consisting of variable names or other arrays. For each name, session_register() registers the global variable with that name in the current session.
Caution
If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled.
register_globals: important note: Since PHP 4.2.0, the default value for the PHP directive register_globals is off, and it is completely removed as of PHP 6.0.0. The PHP community encourages all to not rely on this directive but instead use other means, such as the superglobals.
toCode:'session_register("where"); $where = "http://earth.engr.ccny.cuny.edu/noaa/wc/Lidar/chainedmenu2.php";'
Right? I'll try that out.Code:$_SESSION['where'] = "http://earth.engr.ccny.cuny.edu/noaa/wc/Lidar/chainedmenu2.php"
's right. I would have thought, however, that session_register() would simply add the variable to $_SESSION, where register_globals was off.
It's very plain, now, that the variable $_SESSION['where'] works only within a page, and is NOT passed correctly.
I define it at the beginning of chainedmenu2.php and it is not there when it goes to the login screen.
If I define it in auth.inc.php and use it in the header statement, the redirect back to chainedmenu2.php says that it is there, but ONLY because it is in the first lines of php code. I know this to be true because I made a second copy/version of chainedmenu2 (chainedmenu3.php) without the $_SESSION declaration and the different redirect or 'which' def, and the value was NOT passed. So, something is really wrong, and I just don't know what it is. Help please (sigh)?
Sure you called session_start(), and are you sure that no HTML was sent first? Not even a linebreak before the <?php?
Yes, I did that. The key is that session_start() ALSO must be the first line of the included files! I just fixed that and everything is OK now. Thanks for your help, Twey.