PHP Echo Returns Blank Page
<p>Now, before I start, I want to say this. Yes. I know mysql_* is becoming less an less, what supported? I plan on changing this soon, just bare with me here.</p>

<p>Anyway, I have "checks" in here and if something happens, it will <code>echo</code> a phrase like <code>The username you supplied is already in use</code> or whatever. When it DOES display it though, it'll only display it on a blank page with that text. What is wrong here?</p>

<p>PHP </p>

<pre><code>&lt;?php
    include('./dbconnect/global.php');

    if ($_POST['register']) {
        $username = mysql_real_escape_string(strip_tags($_POST['username']));
        $password = mysql_real_escape_string(strip_tags($_POST['password']));
        $email = mysql_real_escape_string(strip_tags($_POST['email']));

        if (!$username||!$password||!$email)
            echo "PLease Fill in The Required Fields";
        else {
            //check if username is taken
            $check = mysql_query("SELECT * FROM users WHERE username='$username'");
            if (mysql_num_rows($check) &gt;= 1)
                echo "The Username you Supplied Is Already in Use! &lt;a href='./register'&gt;Back&lt;/a&gt;";
            $check2 = mysql_query("SELECT * FROM users WHERE email='$email'");
            if (mysql_num_rows($check) &gt;= 1)
                echo "The Email you Supplied Is Already in Use! &lt;a href='./register'&gt;Back&lt;/a&gt;";
            else {
                $password2 = md5($password);
                $register = mysql_query("value and stuff)") or die(mysql_error());
                echo "Thanks for registering, $username! &lt;a href='./index'&gt;Home&lt;/a&gt;";
            }
        }
    }

    else {
?&gt;
</code></pre>

<p>HTML</p>

<pre><code>&lt;html&gt;

&lt;head&gt;

    &lt;title&gt;CoreCrafters&lt;/title&gt;
    &lt;link rel="stylesheet" type="text/css" href="./css/main.css"&gt;

&lt;/head&gt;

&lt;body&gt;

    &lt;?php include('./include/nbar.php') ?&gt;

    &lt;div id="main"&gt;

        &lt;div id="register"&gt;
            &lt;div id="wrapper"&gt;
                &lt;form action="register" method="POST"&gt;
                    Username
                    &lt;br /&gt;
                    &lt;input type="username" name="username"&gt;
                    &lt;br /&gt;
                    Password
                    &lt;br /&gt;
                    &lt;input type="password" name="password"&gt;
                    &lt;br /&gt;
                    Email
                    &lt;br /&gt;
                    &lt;input type="email" name="email"&gt;
                    &lt;br /&gt;&lt;br /&gt;
                    &lt;input type="submit" name="register" value="Register"&gt;
                &lt;/form&gt;
            &lt;/div&gt;
        &lt;/div&gt;

    &lt;/div&gt;

    &lt;?php include('./include/footer.php') ?&gt;

&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>Ending PHP (From ELSE at end)</p>

<pre><code>&lt;?php
    }
?&gt;
</code></pre>

<p>CSS</p>

<pre><code>body {
    margin: 0;
    padding: 0;
    background-color: #EEE;
}

#headerbar {
    width: 100%;
    background-color: #000;
}

a {
    color: #069;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    -ms-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -webkit-transition: all 0.2s linear;
}

a:hover { 
    color: #c00;
}

#nav {
    padding: 0;
    width: 100%;
    float: left;
    list-style: none;
    margin: 0 0 3em 0;
    background-color: #f2f2f2;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc; 
}

#nav li {
    float: left;
}

#nav li a {
    color: #069;
    display: block;
    font-weight: bold;
    padding: 8px 15px;
    text-decoration: none;
    transition: all 0.2s linear;
    border-right: 1px solid #ccc;
    -o-transition: all 0.2s linear;
    -ms-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -webkit-transition: all 0.2s linear;
}

#nav li a:hover {
    color: #c00;
    background-color: #fff;
}

#footer {
    width: 94%;
    padding: 10px;
    margin-top: 10px;
    margin-left: auto;
    padding-left: 0px;
    text-align: center;
    margin-right: auto;
    padding-right: 0px;
    border: 1px solid #DDD;
    background-color: #FFF;
}

#main {
    width: 94%;
    margin-top: 50px;
    min-height: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #DDD;
    background-color: #FFF;
}

#register {
    width: 15%;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    background-color: #CCC;
    border: 1px solid #AAA;
}

#logbar {
    width: 150px;
    float: right;
    min-height: 36px;
    padding-left: 5px;
    padding-right: 50px;
    background-color: #DDD;
}
</code></pre>

<p>As requested, I posted most of the page onto here.</p>
