PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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