PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
For the life of me I cannot get this variable to parse to another page. I am trying to parse variables using sessions for a four page application and it isn't working. No matter what I try or do.
[b]On Page 1 (which is a redirector that works fine)[/b]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Unless you use an ancient php version don't use session_register().
Use the $_SESSION superglobal array.
Instead of doing session_register($somevar) simply do $_SESSION['somevar']=$somevar; to save the variable in the session then
$somevar=$_SESSION['somevar'] to read it.
Of course, you would save it in the first file after you read the var from $_POST
If you're going to buy a more recent book make sure it targets php 5.
http://php.net/ wrote:PHP 4 end of life announcement
[13-Jul-2007]
Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.