Jump to content

error unexpecend $end


doublea2k7

Recommended Posts

can anyone tell me whats wrong with this script

 

i get this error

 

Parse error: syntax error, unexpected $end in /home/urzone/public_html/smashlegacies.exofire.net/loginfix_check.php on line 28

 

<?
include "config2.php";
?>

<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<?
$name=mysql_real_escape_string($name);

if($rec=mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE name='$name'"))){
if(($rec['name']==$name)){
if(mysql_query("update accounts set loggedin='1' WHERE name='$name'")){
echo "<font face='Verdana' size='2' ><center>OK <br> Your account has been fix try to log in the game now!</font></center>";}}
?>

</body>

</html>

 

im really new at php coding so please help

Link to comment
https://forums.phpfreaks.com/topic/103654-error-unexpecend-end/
Share on other sites

You didn't close a bracket, if you line your code up it will be a lot easier to spot.

 

<?
include "config2.php";
?>

<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
<?
$name=mysql_real_escape_string($name);

if ($rec=mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE name='$name'"))) {
    if (($rec['name']==$name)) {
        if (mysql_query("update accounts set loggedin='1' WHERE name='$name'")) {
            echo "<font face='Verdana' size='2' ><center>OK <br> Your account has been fix try to log in the game now!</font></center>";
        }
    }
}

Link to comment
https://forums.phpfreaks.com/topic/103654-error-unexpecend-end/#findComment-530770
Share on other sites

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.