Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Поиск в поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее
Архивировано

not accepting session variables

cor-el отвечено
takabyte

Here's the code that sets the session "id": session_start(); $id="1234"; $_SESSION['id']=$id; $user=$_SESSION['id']; echo "user=" . $user;

That code works perfectly, and displays "1234" But when you move to the next page, and the code is: session_start(); $user=$_SESSION['id']; echo "user=" . $user;

it displays "user=" The session variable is lost from one page to another. Why is this happening? Is there a setting that isn't set correctly? All of this works perfectly in IE, but fails in both Firefox and Chrome.

Here's the code that sets the session "id": session_start(); $id="1234"; $_SESSION['id']=$id; $user=$_SESSION['id']; echo "user=" . $user; That code works perfectly, and displays "1234" But when you move to the next page, and the code is: session_start(); $user=$_SESSION['id']; echo "user=" . $user; it displays "user=" The session variable is lost from one page to another. Why is this happening? Is there a setting that isn't set correctly? All of this works perfectly in IE, but fails in both Firefox and Chrome.

Все ответы (1)

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25