Page not loading properly; showing large, random chunks of code.

Almost any of my PHP files will work perfectly, but these new ones don’t seem to be doing so well.

Whenever I test them out, about ¼ of it works like it should, and the other ¾ just shows a large bit of the coding involved.

I’m not sure what I’m doing wrong, as it looks perfectly fine to me.

Here’s a bit of the code, that shows up for no apparent reason:

if($session->logged_in){ echo "<h1>Logged In</h1>";

This will appear as:

logged_in) { echo "
[size=20pt]Logged In[/size]

–On my page, then some of the next part will work fine, and it continues showing more chunks of code.

The full (first) part of it:

<?

if($session->logged_in){
   echo "<h1>Logged In</h1>";
   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
       ."[<a href="userinfo.php?user=$session->username">My Account</a>]   "
       ."[<a href="useredit.php">Edit Account</a>]   ";
   if($session->isAdmin()){
      echo "[<a href="admin/admin.php">Admin Center</a>]   ";
   }
   echo "[<a href="process.php">Logout</a>]";
}
else{
?>

And yes, this is a login system.

Sponsor our Newsletter | Privacy Policy | Terms of Service