tomyknoker
04-04-2007, 06:12 PM
Can anyone see why my htm and css won't work on this page? I have done like 10 pages in a row fine and this one just ignores the stylesheet entirely...
<?php
if(empty($_SESSION['session_started']))
{
session_cache_expire(120);
session_start();
$_SESSION['session_started'] = "TRUE";
}
/* connect to the mysql database and use different queries for the count of members */
include 'library/config.php';
include 'library/opendb.php';
$info = mysql_query("SELECT * from `tblrepresentatives`");
?>
<!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">
<html>
<head>
<title>Members Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="cs_style.css" rel="stylesheet" type="text/css" />
<body>
<div id="wrap">
<div id="header"><p>Hello <? echo $_SESSION['txtUserId']; ?>! You are now Logged in.<a href="index.php">Logout</a></p></div>
<div id="nav"><?php include("nav.php"); ?></div>
<div id="main">
<p><img src="images/membership_status.png" alt="Membership Status"></p>
<div id="container">
<?php
echo '<table width="700" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th scope="col" class="twenty">FIRST NAME</th>
<th scope="col" class="twenty">LAST NAME</th>
<th scope="col" class="twenty">MEMBERS</th>
<th scope="col" class="twenty">EDIT</th>
<th scope="col" class="twenty"> </th>
</tr>
</thead>';
//now check it for failure and display a decent error message if it did fail
if (!$info) {
die("Query failed. Query text: $query<br />Error Message: ".mysql_error());
}
else {
while ($qry = mysql_fetch_array($info)) {
$i++;
$rep = $qry['rep_NBR'];
$members = mysql_query("SELECT * FROM `tblmembers` WHERE `rep_NBR`='$rep'");
$total_members = mysql_num_rows($members);
//create the layout
?>
<tr valign="top" class="<?php echo $i % 2 ? 'odd' : 'even'; ?>">
<td><?php echo $qry['rep_Firstname']; ?></td>
<td><?php echo $qry['rep_Lastname']; ?></td>
<td><a href="showRepMembers.php?rep_id=<?=$qry['rep_NBR'];?>"><?=$total_members;?></a></td>
<td><a href="showRepEdit.php?rep_id=<?php echo $qry['rep_NBR']; ?>">Edit</a></td>
<td>Delete</td>
</tr>
<?php
}
}
echo '</table></div>
</div>
<div id="footer">
<p>Footer</p>
</div>
</body>
</html>';
include 'library/closedb.php';
?>
<?php
if(empty($_SESSION['session_started']))
{
session_cache_expire(120);
session_start();
$_SESSION['session_started'] = "TRUE";
}
/* connect to the mysql database and use different queries for the count of members */
include 'library/config.php';
include 'library/opendb.php';
$info = mysql_query("SELECT * from `tblrepresentatives`");
?>
<!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">
<html>
<head>
<title>Members Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="cs_style.css" rel="stylesheet" type="text/css" />
<body>
<div id="wrap">
<div id="header"><p>Hello <? echo $_SESSION['txtUserId']; ?>! You are now Logged in.<a href="index.php">Logout</a></p></div>
<div id="nav"><?php include("nav.php"); ?></div>
<div id="main">
<p><img src="images/membership_status.png" alt="Membership Status"></p>
<div id="container">
<?php
echo '<table width="700" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th scope="col" class="twenty">FIRST NAME</th>
<th scope="col" class="twenty">LAST NAME</th>
<th scope="col" class="twenty">MEMBERS</th>
<th scope="col" class="twenty">EDIT</th>
<th scope="col" class="twenty"> </th>
</tr>
</thead>';
//now check it for failure and display a decent error message if it did fail
if (!$info) {
die("Query failed. Query text: $query<br />Error Message: ".mysql_error());
}
else {
while ($qry = mysql_fetch_array($info)) {
$i++;
$rep = $qry['rep_NBR'];
$members = mysql_query("SELECT * FROM `tblmembers` WHERE `rep_NBR`='$rep'");
$total_members = mysql_num_rows($members);
//create the layout
?>
<tr valign="top" class="<?php echo $i % 2 ? 'odd' : 'even'; ?>">
<td><?php echo $qry['rep_Firstname']; ?></td>
<td><?php echo $qry['rep_Lastname']; ?></td>
<td><a href="showRepMembers.php?rep_id=<?=$qry['rep_NBR'];?>"><?=$total_members;?></a></td>
<td><a href="showRepEdit.php?rep_id=<?php echo $qry['rep_NBR']; ?>">Edit</a></td>
<td>Delete</td>
</tr>
<?php
}
}
echo '</table></div>
</div>
<div id="footer">
<p>Footer</p>
</div>
</body>
</html>';
include 'library/closedb.php';
?>