Jump to content

Recommended Posts

It appears that a certain cookie isnt being logged when I use IE, but it does when I use firefox... I know that the version of IE that I am using is very old... But should that matter?....  Anyone have any ideas to fix my code (if the code matters between 2 different internet browsers, give me a heads up? lol)

Link to comment
https://forums.phpfreaks.com/topic/64429-solved-cookies-being-logged/
Share on other sites


if($cookie_id2!="" && $cookie_id2=="$check_main_ol_id2"){
$position1="you have a cookie that matches one in our database!";
	if($check_main_ol_uid!="" && $cookie_username=="$check_user_username" && $cookie_username!="" && $cookie_password=="$check_user_password2" && $cookie_password!=""){
	$position2="you are a user! but do you exist?";
		if(checkExist("user","users","where id='$check_main_ol_uid'")=="yes"){
		$position3="you are a user, that exists!";
		$update_main_ol=mysql_query("update `online_logs` set `status`='online', `active`='$date_time3', `expires`='$cookie_logged', `board`='$board', `cat`='$cat', `action`='$action', `id3`='$id', `date`='$date_today2', `time`='$date_time', `ip`='$ip' where id2='$cookie_id2'") or die("update <b>guest</b> cookie doesnt work!");
		}else{
		$position3="you are a user that doesnt exist..";
		$delete_main_ol=mysql_query("delete from `online_logs` where id2='$cookie_id2'");
		}
	}else{
	$position2="you are a guest! thats all we need to do here.";
	$update_main2_ol=mysql_query("update `online_logs` set `status`='online', `active`='$date_time3', `expires`='$date_time3', `board`='$board', `cat`='$cat', `action`='$action', `id3`='$id', `date`='$date_today2', `time`='$date_time', `ip`='$ip' where id2='$cookie_id2'") or die("update <b>guest</b> cookie doesnt work!");
	setcookie('id2',$cookie_id2,time()+3*60);
	setcookie('logged',$date_time3,time()+3*60);
	}
}else{
$position1="you are a guest with no log. creating cookie.";
setcookie('id2','$date_id2',time()+2*60);
setcookie('username','',time()+2*60);
setcookie('password','',time()+2*60);
setcookie('logged',$date_time3,time()+2*60);
$insert_main_ol=mysql_query("insert into `online_logs` (id2,expires,status,active,board,cat,action,id3,date,time,ip)VALUES('$date_id2','$date_time3','online','$date_time3','$board','$cat','$action','$id','$date_today2','$date_time','$ip')");
}

 

the $check_main_ol_id2 is a variable that would have the id2 cookie information (same as cookie_id2) if there was a log made with that id2 (maybe a page before, or during their visit to the page).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.