Page 1 of 1

2 questions - cookies , and code not appearing

Posted: Thu Aug 28, 2003 10:25 am
by gasoga
Hi this might take a bit to explain: if i open two windows and login as two different people everytime i do something with the first person its fine but once you do something with the second person it will overwrite the cookie for the first person with the second persons details and now in either window you will be loged in as the second person. Can anyone tell me if there is anything i can do to stop this??

Second question is : when i login on my copmuter everything comes up fine like it is suppsoed to look , however when my boss login on his computer there is a chunk of the form that is missin , could this be becasue i have been programming on windows 2000 with internet explorer5 and his computer is xp with internet explorer 6?? Or does taht make a difference??

This is the code that appears on mine but not on his! :


Code: Select all

<?php

<?PHP
if ($HTTP_COOKIE_VARS['UserName'] == 'ikeane')
{
	VeiwAdminPage($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'lmcgill')
{
	VeiwTimeSheet1($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'jkeane')
{
	VeiwTimeSheet2($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'ereid')
{
	VeiwTimeSheet3($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'bmccormack')
{
	VeiwTimeSheet4($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'mfrench')
{
	VeiwTimeSheet5($ErrorCode);
}
if($HTTP_COOKIE_VARS['UserName'] == 'carmstrong')
{
	VeiwTimeSheet6($ErrorCode);
}

?>
Any advice or ideas would be very welcome!
Thanx in advance!

Posted: Thu Aug 28, 2003 4:41 pm
by qads
1.
the problem is the cookie name, when you login the 2nd time it overwrites the first cookie with new values, the only way to stop that is to have a random cookie name maybe? you just have to set diffrenet name for each cookie.

2.
i hope your not useing frontpage lol, just check the html and make sure all the tags are closed.