Hello im new coder and i like php but i have some problems with sessions at the last php version!
My code is:
[code]<?php
ob_start();
include(“conf.php”);
session_start();
if(!session_is_registered(myusername))
{
header(“location:index.html”);
}
$user=$_SESSION[‘myusername’];
$query=“SELECT * FROM admin where user=’$user’”;
$result=mysql_query($query);
$row = mysql_fetch_array( $result );
$userid=$row[‘id’];
?>[/code]
but i recieve an error
Deprecated: Function session_is_registered() is deprecated
Can you help me to fix my code to work… and where im wrong ?
Thanks in advice!