Register and Login errors
Posted: Sat Jan 28, 2012 7:34 pm
Hey! I'm doing programming as part of my computing uni course. I'm still a beginner but I want to learn. I'm taking things slowly and following the videos step by step. I'm up to Register and Login (User Account System), which I think is the third or forth playlist. Everything else I done works perfectly!
The errors I have is: (I have copied the errored lines)
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\user_system\core\init.inc.php on line 7
The errors I have is: (I have copied the errored lines)
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\user_system\core\init.inc.php on line 7
<?php
session_start();
$exceptions = array('register', 'login');
$page = substr(end(explode('/', $_SERVER['SCRIPT_NAME'])), 0, -4);
if (in_array($page, $exceptions) === false){
if (isset($_SESSION['username']) === false){
header('Location: login.php');
die();
}
}
mysql_connect('localhost', 'root', '');
mysql_select_db('user_system');
$path = dirname(__FILE__);
include("{$path}/inc/user.inc.php");
?>
(SOLVED THE OTHER 2)