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!
I have a program that in the first page has a text box, and a submit button,in the second page I call the text box called var in PHP and I make it a Variable session, and in the third page I call such variable, but it says it is undefined, the session_start() is already put in the first page. The funny thing is that in works only for some computers.
Ok, the thing is that the variable: $var says that does not exist, so when I write the print_r ($_SESSION) it prints the values of such session, which is an array, so that is why it says Array ().
done it, if I do it like that it do works, is like the $_SESSION is the same thing as the $_POST, which of course is totally different but it does not behaves like that.
farid wrote:Ok, the thing is that the variable: $var says that does not exist, so when I write the print_r ($_SESSION) it prints the values of such session, which is an array, so that is why it says Array ().
If it only outputs Array() that means you have an empty array, thus your session vars were not set or your session was not started on that page.
By the way, please make use of the edit button instead of posting 3 posts in a row