I get this Error: fatal error syntax error, unexpected 'is' (t_string) on line number 2
Sorry I am new at this. Everything was fine and not sure what changed Here is php code:
<?php
if (session_id() == "")
{
session_start();
}
if (session_id() == "")
{
session_start();
}
if (!isset($_SESSION['username']))
{
$_SESSION['referrer'] = $_SERVER['REQUEST_URI'];
header('Location: ./sorry.php');
exit;
}
if (isset($_SESSION['expires_by']))
{
$expires_by = intval($_SESSION['expires_by']);
if (time() < $expires_by)
{
$_SESSION['expires_by'] = time() + intval($_SESSION['expires_timeout']);
}
else
{
unset($_SESSION['username']);
unset($_SESSION['expires_by']);
unset($_SESSION['expires_timeout']);
$_SESSION['referrer'] = $_SERVER['REQUEST_URI'];
header('Location: ./sorry.php');
exit;
}
}
$roles = array("Administrator", "Member", "Guest");
if (!in_array($_SESSION['role'], $roles))
{
header('Location: ./sorry.php');
exit;
}
?>
fatal error syntax error
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Re: fatal error syntax error
I do not see any error in the code.
Are you sure this is the code that is causing the error?
Are you sure this is the code that is causing the error?
Re: fatal error syntax error
No,
Just do not know where to look!
Just do not know where to look!
Re: fatal error syntax error
What is the code of the entire page?
Or do you have a demo project?
Or do you have a demo project?