For some reason my footer doesnt want to go at the bottom of the page.
css
everything works ok on this page
but not here
any ideas
css
Code:
@charset "utf-8";
/* CSS Document */
body, html {
background:#444;
margin: 20px auto;
color: #555;
font: 0.9em mangal, verdana, arial, sans-serif;
}
h2 {
text-align: center;
font: 16pt mangal, verdana, arial, sans-serif;
}
#header {
text-align: center;
font: 16pt mangal, verdana, arial, sans-serif;
background:#ddd;
}
#wrap {
width:750px;
margin:0 auto;
background:#E8112D;
}
#main {
padding-top:20px;
padding-bottom:20px;
text-align: center;
background:#fff;
width:700px;
margin: 25px auto;
}
#footer {
font: 8pt mangal, verdana, arial, sans-serif;
text-align:right;
padding:5px 10px;
}
everything works ok on this page
Code:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?php
$link = mysql_connect('localhost', 'xx, '*****');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
?>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body><div id="wrap"><div id="header"><h1> Upload Tool</h1>
</div>
<div id="main">
<form action="Display.php" method="post" name="Course Select" target="_self"><?php
mysql_select_db("db", $link);
$query="SELECT DISTINCT Course FROM misimport";
/* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
$result = mysql_query ($query);
echo "<select name=category value=''></option>";
// printing the list <strong class="highlight">box</strong> select command
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value='$nt[Course]'>$nt[Course]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list <strong class="highlight">box</strong>
?>
<input name="Submit" type="submit" value="Submit" /></form>
<?php mysql_close($link); ?>
</div><div id="footer">Produced by xxx</div></div>
</body>
</html>
but not here
Code:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Untitled Document</title>
<?php
$link = mysql_connect('localhost', 'xx', '***');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$Course=$_POST["category"];
mysql_select_db("db", $link);
$query="SELECT * FROM misimport WHERE Course = '" . mysql_real_escape_string($_POST["category"]) . "'";
$result = mysql_query ($query);
?>
</head>
<body><div id="wrap"><div id="header"><h1>Moodle Upload Tool</h1>
</div>
<div id="main">
<?php echo $_POST["category"];
echo "<table border='2'>";
while($row = mysql_fetch_array($result))
{
echo "<tr><td>";
echo $row['Id'];
echo "</td><td>";
echo $row['Id'];
echo "</td><td>";
echo $row['DOB'];
echo "</td><td>";
echo $row['Firstname'];
echo "</td><td>";
echo $row['Surname'];
echo "</td><td>";
echo $row['xxx'];
echo "</td><td>";
echo $row['Course'];
echo "</td>";
echo "</tr>";
}
?>
</div>
<div id="footer">Produced by xxx</div>
</div>
</body>
</html>
Last edited: