Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

not accepting session variables

  • 1 απάντηση
  • 6 έχουν αυτό το πρόβλημα
  • 3 προβολές
  • Τελευταία απάντηση από cor-el

more options

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)

more options

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