Hi I am trying to do a new design in this script and I have no idea why but when I put my html/css footer code in the php file it doesn't put the footer where it should be. Here is what I mean [Click Here](null) and this is the code. Any help would be greatly appreciated thanks.
<?php
session_start();
include "header.php";
include "config.php";
$a="";
$b="";
if ($_POST) {
$a=trim($_POST["id"]);
$b=trim($_POST["password"]);
$a=str_replace("'","",$a);
$b=str_replace("'","",$b);
$a=str_replace("\"","",$a);
$b=str_replace("\"","",$b);
}
if ($a=="" || $b=="")
{
if ($_SESSION["username_session"]=="" || $_SESSION["password_session"]=="")
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<html>
<body>
<form action="login.php" method="post">
<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Username</td><td><input type="text" name="id"></td></tr>
<tr><td>Password</td><td><input type="password" name="password"></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type="submit" value="Log In"></td></tr>
</table>
</font></p>
</form>
<?
}
else
{
middle();
}
}
else
{
$check=0;
$id=$_POST["id"];
$rs = mysql_query("select * from users where Username='$id' and Password='$b' and active=1");
if (mysql_num_rows($rs)>0) {
$arr=mysql_fetch_array($rs);
$check=1;
$_SESSION["username_session"]=$arr[8];
$_SESSION["password_session"]=$arr[9];
middle();
}
if ($check==0)
{
$rs = mysql_query("select * from users where Username='$a' and Password='$b' and active=0");
if(mysql_num_rows($rs)>0) $check=3;
if($check==0) {
print "<h2 align=center>Invalid Username or Password.</h2>";
}
elseif($check==3) {
print "<h3 align=center>You hadn't activated your account yet by clicking on activation link.<br>If you hadn't received the confirmation email yet <A href=resendv.php>Click Here</a> to resend your confirmation email.</h3>";
}
?>
<form action="login.php" method="post">
<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Username</td><td><input type="text" name="id"></td></tr>
<tr><td>Password</td><td><input type="password" name="password"></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type="submit" value="Log In"></td></tr>
</table>
</font></p>
</form>
<?
}
}
function middle()
{
include "config.php";
$id=$_SESSION["username_session"];
$rs = mysql_query("select * from users where Username='$id'");
$arr=mysql_fetch_array($rs);
$check=1;
$email=$arr[7];
$name=$arr[1];
$ref=$arr[11];
$username=$_SESSION[username_session];
$status=$arr[14];
if($status==1) {
$statust="Free";
}
else {
$statust="Pro";
}
$total=$arr[15];
$paid=$arr[17];
$unpaid=$arr[16];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="2"> </td>
</tr>
<tr>
<td align="left" class="bodytext" width="150" valign="top"><br>
<p align="left"> <br><font face=verdana size=2><a href="login.php">Members Home</a><br><br>
<a href="purchasepos.php">Purchase Package</a><br><br>
<a href="managepos.php">Manage Positions</a><br><br>
<a href="stats.php">Stats</a><br><br>
<a href="withdrawal.php">Withdrawal</a><br><br>
<a href="ads.php">Promotional Center</a><br><br>
<a href="banners.php">Banner Advertisement</a><br><br>
<a href="textadv.php">Text Ad Advertisement</a><br><br>
<a href="bonus.php">Bonus</a><br><br>
<a href="update_pf.php">Profile</a><br><br>
<a href="submittestimonials.php">Submit Testimonials</a><br><br>
<a href="logout.php">Logout</a>
</font></p>
</td><td align="left" class="bodytext" width="500" valign="top">
<table border="0" width="98%"><tr><td>
<?
$rs=mysql_query("select * from pages where ID=3");
$arr=mysql_fetch_array($rs);
$arr[2]=str_replace("{sitename}",$sitename,$arr[2]);
$arr[2]=str_replace("{name}",$name,$arr[2]);
echo stripslashes($arr[2]);
?>
</td></tr></table>
</td></tr>
<tr>
<td height="10" colspan="2"> </td>
</tr>
</table>
<? }
include "footer.php";
?>