Page 1 of 1

Wtf, I say... wtf?

Posted: Sat Dec 27, 2003 11:24 am
by Jim

Code: Select all

function Secure()
	{	
		global $conf;
		
		$u_cookie = $_COOKIE['".$conf['cookie_pre']."user']; // Line 12
		$p_cookie = $_COOKIE['".$conf['cookie_pre']."pass'];
	
		// Check for necessary cookies
		if ($u_cookie && $p_cookie)
		{
			session_start();
			// We'll do three checks -
			// 1. Check the name/pass against the database
			// 2. Check the user's IP against the last IP logged in the same session
			// 3. Check and log the user's administrative level
			
			$check_name = mysql_query("select id from ".$conf['table_pre']."users where username = '{$_COOKIE['panel_user']}' and password = '{$_COOKIE['panel_pass']}'");
			$num = mysql_num_rows($check_name);
				if ($num != '1') { $this->login(); }
				
			$check_ip = mysql_query("select id from ".$conf['table_pre']."users where username = '{$_COOKIE['panel_user']}' and sess_id = '{$_SESSION['sess_id']}'");
			if (!$check_ip) { echo mysql_error(); }
			$num = mysql_num_rows($check_ip);
				if ($num != '1') { $this->login(); }
				
			$check_level = mysql_query("select level from ".$conf['table_pre']."users where username = '{'panel_user']}' and password = '{$_COOKIE['panel_pass']}'");		
				$info = mysql_fetch_row($check_level);
				
							
		
		}
Parse error: parse error, expecting `']'' in /home/ogresnet/public_html/admin/classes/secure.php on line 12


*stumped*

Posted: Sat Dec 27, 2003 11:51 am
by JAM

Code: Select all

$u_cookie = $_COOKIE[$conf['cookie_pre'].'user']; // Line 12
      $p_cookie = $_COOKIE[$conf['cookie_pre'].'pass'];
?

Posted: Sat Dec 27, 2003 12:14 pm
by Jim
Yup - that did it. I'm not sure why that didn't work the first time I tried it. Thanks dude.

Posted: Sun Dec 28, 2003 4:23 am
by qads
i think it was cos of the "A".....see, you dont have "A" in your name, but JAM does :lol:

Posted: Sun Dec 28, 2003 4:38 am
by Nay
And his is in all caps.......so he's a level higher ;)

-Nay