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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.