Jump to content

Parse error... parse error... not another parse error


vombomin

Recommended Posts

Hi guys I was wondering if you could help me... I am getting parse errors o¡in a script I am witting

the error is

Parse error: parse error, unexpected T_IF in /home/helpreal/public_html/test5/manager/index.php on line 8

heres the code ifit makes it any easier to help

<?php

include( "../database.php" );

$settings_result = mysql_query("SELECT access_id,status FROM settings where id = '1'", $db);
$setif($setting->access_id == "0" or $setting->status != MD5("1"))

if ($sting = mysql_fetch_object("$settings_results")) {
//setting->access_id == "0"){
header("location: mgr.php");
exit;
} else {
// REDIRECT TO LOGIN PAGEss
header("location: login.php");
// IF REDIRECT FAILS PRINT LINK TO LOGIN PAGE
echo "<a href=\"login.php\"><font face=\"arial\" size=\"2\" color=\"#0065FC\">Click here to log into your site manager.</font></a>";
exit;
}
?>

hope this is helpful
If you get a parse error in this format:
Parse error: parse error, unexpected T_[x] in [path/of/script/here.php] on line [line numer here]

Always check that you are ending your PHP lines with a semi-colon (;). Usually the line number gives it away. Do not look at the line PHP says the error is on as that is not where you missing the semi-colon, as the proper error is usually 1 or 2 lines above where the error occured. So if you get a parse error that says an unexpected T_VARIABLE on line 12 then look at lines 9 - 11 to make sure you are ending your lines correctly.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.