Page 1 of 1

User sessions only work in ie

Posted: Sat Jul 10, 2004 7:44 pm
by pinehead18
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.

Posted: Sun Jul 11, 2004 3:08 am
by John Cartwright
just for the hell of it.. why wouldnt u do

session_start();
$_SESSION["name"] = $_POST["uname"];


????????

Posted: Sun Jul 11, 2004 4:02 am
by pinehead18
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?

Posted: Sun Jul 11, 2004 4:11 am
by kettle_drum
Are they set to accept cookies? You set any specific security restrictions on those browsers?

Posted: Sun Jul 11, 2004 10:29 am
by pinehead18
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

Posted: Sun Jul 11, 2004 10:35 am
by pinehead18
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

Posted: Sun Jul 11, 2004 11:31 am
by feyd
I don't remember needing the Cache-control header for IE to use cookies... :roll:

Posted: Sun Jul 11, 2004 12:41 pm
by kettle_drum
Ive never used it in my life.

Posted: Sun Jul 11, 2004 2:20 pm
by pinehead18
kool, thank you.