I forgot to post my code:
index.php:
<?php
$sql = mysql_connect ("localhost", "db", "pw") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("db", $sql);
$ip = $_SERVER["REMOTE_ADDR"];
$ipcheck = mysql_query("SELECT * from banned where IP='$ip'", $sql) or die("Connection failed because: ".mysql_error());
if(mysql_num_rows(($ipcheck)) > 0) {
die("<a href=\"http://www.zoneedit.com/lookup.html?ipaddress=$ip&server=&reverse=Look+it+up\" target=\"_blank\">$ip</a> has been banned from this site for violating the Terms of Use.\n");
}else{
}
switch($_GET['id']) {
case 'home':
include 'home.php';
break;
case 'about':
include 'about.php';
break;
case 'portfolio':
include 'portfolio.php';
break;
case 'products':
include 'products.php';
break;
case 'contact':
include 'contact.php';
break;
default:
require 'home.php';
}
if($_GET['cat']) {
switch($_GET['cat']) {
case 'more':
include 'more.php';
break;
}
}
?>
home.php:
<?php
/* home.php */
include ("head.php");
include ("logo.php");
include ("nav.php");
include ("htitle.php");
include ("date.php");
include ("clogin.php");
include ("hbody.php");
include ("footlinks.php");
include ("foot.php");
?>
head.php
<?php
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>website</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253" />
<script src="jscripts/iro.js"></script>
<style type="text/css" media="all">
@import "css/style.css";
<!--
.style1 {color: #000000}
-->
</style>
</head>
nav.php
<?php
ob_start();
session_start();
header("Cache-control: private"); //Internet Explorer 6.x Security Fix
$_SESSION['sid'] = session_id(); //session_id () defined
?>
<tr>
<td width="233" style="height:60px; width:168px;" valign="top"><div style="height:34px;background-color:#C1DDA0;"> </div></td>
<td valign="top" width="579"><table cellpadding="0" cellspacing="0" width="579">
<tbody>
<tr>
<td height="33">
<div class="navblock"><a href="index.php?id=home&sid=<? echo $_SESSION['sid'] ?>">home</a></div></td>
<td height="33"><div class="navblock"><a href="index.php?id=about&sid=<? echo $_SESSION['sid'] ?>">about</a></div></td>
<td height="33"><div class="navblock"><a href="index.php?id=portfolio&sid=<? echo $_SESSION['sid'] ?>">portfolio</a></div></td>
<td height="33"><div class="navblock"><a href="index.php?id=products&sid=<? echo $_SESSION['sid'] ?>">products</a></div></td>
<td height="33"><div class="navblock"><a href="index.php?id=products&sid=<? echo $_SESSION['sid'] ?>">contact</a></div></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
clogin.php
<table cellspacing="0" cellpadding="1" width="151" border="0" align="center">
<tr><br />
<td width="150"><center>Client Login</center></td>
</tr>
<tr>
<td width="150">
<table cellspacing="0" cellpadding="1" width="150" border="0" align="center">
<tr>
<td width="149">
<?php
if ($login == "error") {
print "<div align=\"center\"><font color=\"red\">Incorrect login.</font></div><br>";
} elseif ($login == "logout") {
print "<div align=\"center\">You are now logged out.</div><br>";
} elseif ($login == "registered") {
print "<div align=\"center\">You have now signed up.</div><br>";
} else {
print "<br>";
}
?>
<form enctype="multipart/form-data" action="client/login_script.php" method="post">
<input type="hidden" name="sid" value="$sid" />
Username:
<input type="text" name="username" class="form" size="20"><br>
Password:
<input type="password" name="password" size="20" class="form"><br>
<br>
<div align="right">
<input type="submit" value="Login" onclick="this.disabled = true; this.value='Processing...'; this.form.submit();">
</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
</td>
thats all that has actual PHP in them.
I am so stumped..any help would be appreciated.
Thanks