0

Okay, so I have been trying to get this to work all night, but I can't find anything actually wrong with it. I just thought maybe someone else might be able to just look at it and see the answer... as it's probablly in plain sight.

<?php
session_start();
mysql_connect("powellintellabs.com", "******", "************");
mysql_select_db("blaze website");
$getpage = mysql_query("SELECT * FROM styles WHERE id=1");
while($getpage = mysql_fetch_array($getpage))
    {
    $title = $getpage['title'];
    $background_color = $getpage['background_color'];
    $text_color = $getpage['text_color'];
    $background_image = $getpage['background_image'];
    $background_repeat = $getpage['background_repeat'];
    }
?>
<html>
<head>
<meta name="author" content="Powell Intelligence Labs"/>
<meta name="" content=""/>
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="0815471.css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="menu.js"></script>
</head>
<body style="background-color: <?php echo $background_color ?>; color: <?php echo $text_color ?>; background-image: url('<?php echo $background_image ?>'); background-repeat: <?php echo $background_repeat ?>">
<div id="headbar" class="headbar">BlAzE Brotherhood<br/><div id="menu">
    <?php
    echo '<ul class="menu">';
    $getmenu = mysql_query("SELECT * FROM menu ORDER BY id");
    while($getmenu = mysql_fetch_array($getmenu))
        {
        if($getmenu['type'] == "button")
            {
            $m1 = "false";
            echo '<li><a href="' . $getmenu['link'] . '"><span>' . $getmenu['name'] . '</span></a></li>';
            }
        if($getmenu['type'] == "fly")
            {
            $m1 = "true";
            echo '<li><a href="#" class="parent"><span>' . $getmenu['name'] . '</span></a>';
            echo '  <ul>'
            $getsubmenus = mysql_query("SELECT * FROM submenus WHERE menu='1'");
            while($getsubmenu = mysql_fetch_array($getsubmenus))
                {
                if($getsubmenu['type'] == "button")
                    {
                    $sm1 = "false";
                    echo '<li><a href="' . $getsubmenu['link'] . '"><span>' . $getsubmenu['name'] . '</span></a></li>';
                    }
                if($getsubmenu['type'] == "fly")
                    {
                    $sm1 = "true";
                    echo '<li><a class="parent" href="' . $getsubmenu['link'] . '"><span>' . $getsubmenu['name'] . '</span></a>';
                    $getsubsubmenu = mysql_query("SELECT * FROM subsubmenus WHERE submenu='$getsubmenu[name]' ORDER BY id ASC");
                    while($getsubsubmenu = mysql_fetch_array($getsubsubmenu))
                        {
                        $ssm1 = "true";
                        echo '<li><a href="' . $getsubsubmenu['link'] . '"><span>' . $getsubsubmenu['name'] . '</span></a></li>';
                        }

                }
            }
        if($m1 == "true")
            {
            echo '</ul>';
            }
        if($sm1 == "true")
            {
            echo '</ul>';
            }
        if($ssm1 == "true")
            {
            echo '</ul>';
            $ssm1 = "false";
            }

        }
    echo '<li class="last" class="parent"><a href="#"><span>Search</span></a><ul><li><form id="search" action="search.php" method="get"><input type="text" name="search"/><button type="submit">Search</button></form></li></ul></li>';
echo '</ul>';
?>

</div></div>
<br/>
<br/>
<br/>
<br/>
<?php
$getposts = mysql_query("SELECT * FROM posts WHERE post_to='wall' ORDER BY post_id DESC");
while($getposts_output = mysql_fetch_array($getposts))
    {
    $getuserinfo = mysql_query("SELECT * FROM users WHERE id='1'");
    while($getuserinfo = mysql_fetch_array($getuserinfo))
    {
    $email = $getuserinfo['email'];
    $name = $getuserinfo['fname'] . " " . $getuserinfo['lname'];
    }
    echo "<div id=\"posts\"><div style=\"text-size: 10px;\">By <a href=\"mailto:" . $email . '">' . $name . "</a>  @ " . $getposts_output['post_time'] . "</div><div>" . $getposts_output['post_msg'] . "</div><br/>";
echo '<hr/>';
    }

?>
</body>
</html>

Thanks in advance,
Timothy Powell

3
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by akmozo
1

You're missing a semicolon at the end of line 40, so the parser is confused when it sees the variable at the beginning of line 41.

0

Okay, so I added the semicolon. Now it says Unexpected $end at line 102

0

That error message usually means that you have a missing } somewhere. Proper indentation and an editor that highlights matching braces help with finding that kind of error quickly.

0

Hi,

It's missing a } in the line 78 after

echo '<ul>'

to close the while in line 29.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.