I can not get the following code to work as it is returning an error on the session_is_registered() and do I have to change anything else in the code
Thank you
if(!session_is_registered('user_name')){
if (isset($_POST['username'])) {
$password1 = clean($_POST["password"]);
$username1 = clean($_POST["username"]);
$password2 = crypt($password1);
$result = @mysql_query ("select * from users where user_name = '".$username1."'");
$lim = @mysql_num_rows( $result );
//|| (strlen($username1) < 6) || (strlen($password1) < 6)
if( ($lim!=0) ){
$row = @mysql_fetch_array($result);
$password=$row['user_password'];
if (crypt($password1, $password) == $password){
$sql = @mysql_query ("insert into logs (ip, cdate, status) values ('".$REMOTE_ADDR."','". date("Y-m-d H:i:s") ."', 'Login')");
session_register('user_id');
session_register('user_fullname');
session_register('user_name');
$_SESSION['user_name'] = $row['user_name'];
$_SESSION['user_fullname'] = $row['user_fullname'];
$_SESSION['user_id'] = $row['user_id'];
}//if crypt
else{