Jump to content

Cookie Help Needed Fast ...


nezbo

Recommended Posts

I am really confused with cookies now!!!!!  ???

 

there are a number of computers the company on diffrent sites, all connecting through on servers to the Web.

 

I am getting a problem the if one member of staff logs on one computer and another on a computer they could be using the other users details. It is not doing it on my PC but only on others.

 

if i press F5 to refresh page it picks up the correct cookie. untill the next page is clicked on.

 

Hope this makes sense, cos it is really starting to anoy me grrrrrrr  :'(

i am calling both to compare the database.

 

the system is working fine untill more than one person is trying to use it at work. I think there is something fundamentaly wrong with what i am doing :(

 

here is my full setcookie code

 

if ($num_rows == 1)
	{
		while ($theUser = @mysql_fetch_array($okLogin))
		{
			$usernames = $theUser['CallID'];
			setcookie("user", $usernames, false, "/", false);
			setcookie("pass", $passwordCript, false, "/", false);
			echo "<meta HTTP-EQUIV='refresh' CONTENT='0'; URL='" . $_SERVER['PHP_SELF'] . "'>";
		}
	}
	else
	{
		?>
			<script type="text/javascript">
				alert ("Please enter a valid username and password");
				window.onload = history.back(1)
			</script>
		<?php	
	}

Cheers,

Nezbo

 

Are you calling $_COOKIE['user'] or $_COOKIE['pass'] on the next page?

any ideas...

 

could it be something on the server that is a problem, i.e. where it is storing the cookies.

 

or

 

could any one advise me how to change it to use sessions insted of cookies. And if so there may be a problem with computers being on the same network, and a problem when i move to another page on the site it dose not stay logged in?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.