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!
Moderator: General Moderators
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sat Jul 10, 2004 7:44 pm
session_start();
header("Cache-control: private");
That is the code for my user sessions. It seems that in opera or firefox that this does not work.
i set the sessions like this.
Code: Select all
session_start();
$uname = $_POST['uname'];
$_SESSION['name'] = $uname;
Thank you for any information you can provide me.
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sun Jul 11, 2004 3:08 am
just for the hell of it.. why wouldnt u do
session_start();
$_SESSION["name"] = $_POST["uname"];
????????
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sun Jul 11, 2004 4:02 am
Well, that wasn't even suppose to be their. And that really doesn't help the fact it does not register in opera or firefox does it?
kettle_drum
DevNet Resident
Posts: 1150 Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England
Post
by kettle_drum » Sun Jul 11, 2004 4:11 am
Are they set to accept cookies? You set any specific security restrictions on those browsers?
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sun Jul 11, 2004 10:29 am
See the thing is, it does not just happen on my browser it happens on all opera computers.
Does opera come set not to accept cookies?
Thakn you
Anthony
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sun Jul 11, 2004 10:35 am
Actually if ounjd the problem. A rather weird. I was told i needed the fix header("Cache-control: private"); in order for sessions to work in IE. However, when i use that my sessions wont work in other browsers.
Do i have to include header("Cache-control: private"); under every session_start(); ?
Thank you
Anthony
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Jul 11, 2004 11:31 am
I don't remember
needing the Cache-control header for IE to use cookies...
kettle_drum
DevNet Resident
Posts: 1150 Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England
Post
by kettle_drum » Sun Jul 11, 2004 12:41 pm
Ive never used it in my life.
pinehead18
Forum Contributor
Posts: 329 Joined: Thu Jul 31, 2003 9:20 pm
Post
by pinehead18 » Sun Jul 11, 2004 2:20 pm
kool, thank you.