Hello everybody:)
I am new here so please be gentle;) I am doing a website with login option and it all works perfectly unless I combine the php with the html on one page… When I do it, everything belowsome point in the code is just invisible but when I do it in the Dreamweaver, it all shows fine in the design mode. When I looked at the source code of the website in the browser i noticed something strange: the browser cuts off about a half of my code.
This is the code:
<body>
<div class="container">
<div class="header">
<img src="../social.jpg" width="145" height="56" alt="""" align="right" />
<!-- end .header --></div>
<div class="content">
<div style="width:940px;height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;border:3px solid #000000;background-color:#FFFFFF;padding:10px;">
<table>
<tr><td>
<?php
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
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{
?>
<?php
if($form->num_errors > 0){
echo "<font size=\\"2\\" color=\\"#ff0000\\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="post">
<tr><td>Username:
This is the point where the browser cuts the code off.
</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Remember me next time
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>
</table>
</form>
<?php
}
echo "</td></tr><tr><td align=\\"center\\"><br><br>";
echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";
echo "There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.<br><br>";
include("include/view_active.php");
?>
</td></tr>
</table>
<!-- end .content --></p>
<p> </p>
</div>
</div>
<div class="footer"> <div class="content">
<div style="width:960px;height:auto;-webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;border:3px solid #000000;background-color:#FFFFFF;">
<center><p>Our partners:<br />
</p></center>
<p><center><a href="http://www.fitnessworld.dk"><img src="../fitmessworld.jpg" alt="Fitness World" width="161" height="60" border="0"/></a><a href="../www.fitness.dk"><img src="../fitnessdk.jpg" alt="fitness.dk" width="109" height="60" border="0" /></a><img src="../stadium.jpg" alt="stadium" width="191" height="65" /><a href="../www.sunset-boulevard.dk"><img src="../sunsetboulevard.jpg" alt="Sunset Boulevard" width="92" height="60" /></a>
</center></p>
</div>
<p><!-- end .footer --></p>
</div>
<!-- end .container --></div>
</div>
</ body>
Please guys, help me out because I’m really desperate at this point… Thank you in advance.