Structure

please where could i be wrong here the page is not displaying he navigation, below is the code and css as well

<?php
	//1.create database connection
	$connection = mysql_connect("localhost","root","password");
	if (!$connection) {
		die("Database connection failed: " . mysql_eror());
		}
		//2 select database to use
	$db_select = mysql_select_db("reacheasy","connection");
	if ($db_select) {
		die("Database selection failed: " . mysql_eror());
		}
		?>
<?php require_once("include/functions.php"); ?>
<?php include("include/header.php"); ?>
<div id="navigation">
  <ul>
    
    <?php
	//3. perform database querry
	$result = mysql_querry("SELECT * FROM subjects", $connection);
	if (!$result) {
		die("Database querry failed: " . mysql_eror());
		}
		//4 use returned data
	while($row = mysql_fetch_array($result)) {
		echo $row["menu_name"]."".$row["position"]."<br />";
		}
		?>
		
  </ul>
</div> <!--end of navigation div -->
<div id="bodycontent">
<h3> content area</h3>
<p> i hope this works. </p>
      &nbsp;
</div>
<?php include("include/footer.php"); ?>
<?php
	//5. close connection
	mysql_close($connection);
	?>
/*
CSS for Reacheasy site
*/
	body,html {
 	margin: 0;
}
 
#page {
 	width: 1060px;
 	margin: 0 auto;
 	position: relative
 	/* is the same as: 
 	margin-top: 0;
 	margin-bottom: 0;
 	margin-left: auto;
 	margin-right: auto;
 */
}

/* sticky footer */
/*Opera Fix*/
body:before {
    content:"";
    height:100%;
    float:left;
    width:0;
    margin-top:-32767px;
}
#outer:after {
    clear:both;
    display:block;
    height:1%;
    content:" ";
}
/* ... */
/*
CSS for Reacheasy site
*/
html, body {
    height:100%;
    margin:0;
    padding:0;
    border:none;
}
#outer {
    width:1060px;
    margin:auto;
    min-height:100%;
    margin-top:-52px;
    border-left:1px solid blue;
    border-right:1px solid blue;
}
* html #outer {
    height:100%
}
h1 {
    font-size: xx-large;
    color: white;
    padding: 2em 0 .2em .4em;
    margin: 0;
    background: url(header.jpg) repeat-y right;
}
ul#nav {
    height: 2em;
    list-style: none;
    margin: 0;
    padding: .2em 0;
    margin:0;
    background: url(tabs.gif);
}
ul#nav li {
    background: pink url(tabs.gif);
    float: left;
    margin: 0 1px 0 0;
    padding-left: 10px;
}
ul#nav a {
    background: url(tabs.gif) 100% 0;
    color: #008;
    display: block;
    float: left;
    height: 2em;
    line-height: 2em;
    padding-right: 10px;
    text-decoration: none;
}
ul#nav li.current {
    background-color: #48f;
    background-position: 0 -60px;
}
ul#nav li.current a {
    background-position: 100% -60px;
    color: #fff;
    font-weight: bold;
}
#navigation {
    width: 180px;
    min-height: 475px;
    background:#7da5d8 url(backgrounds/nav-bg.jpg) no-repeat;
    float:left;
}
#bodycontent {
    float:right;
    width:880px;
    background:pink;
}
#header {
    width:100%;
    border-top:52px solid #fff;
    border-bottom:1px solid blue;
}
#footer {
    width:1060px;
    clear:both;
    height:50px;
    border-top:1px solid #000;
    background-color: #fff;
    border-bottom:1px solid #000;
    color: #000000;
    text-align:center;
    margin:0 auto;
}

thanks

‘not displaying the navigation’. Time for one of my ‘you mean what?’ posts.

Not displaying it as in… it’s empty? Not showing up at all? Is it in the Source when you look at your output? Does the DB error message trigger?

not showing in the page source,
the only mark up is the xhtml for the header that is shoeinh


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Reacheasy - Foremost website for easy reach of things globally</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link href="easy.css" rel="stylesheet" type="text/css"/>  
</head>
  <body>
<div id="outer">
<div id="page">
<div id="header">
<h1>Reacheasy</h1>

  <ul id="nav">
    <li class="current"><a href="index.html">Home</a></li>
     <li><a href="women.html">Women</a></li>
     <li><a href="men.html">Men</a></li>
     <li><a href="children.html">Children</a></li>
     <li><a href="homeandappliances.html">Home&amp;Appliances</a></li>

     <li><a href="visionandsound.html">Vision&amp;Sounds</a></li>
      <li><a href="motoring.html">Motoring</a></li>
      <li><a href="homemore.html">More</a></li>
      <li><a href="homecontact.html">Contact us</a></li>
      <li><a href=" rl.html">Register/Log in</a></li>
  </ul>

</div> <!--end of navigation div -->
</div><div id="navigation">
<ul>
<li>
    
    

Well it does seem to be showing up - see the bottom there? Where it shows your navigation div?

Perhaps we need to see header.php as well.

tis is feader.php, its in the includes file


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Reacheasy - Foremost website for easy reach of things globally</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link href="easy.css" rel="stylesheet" type="text/css"/>  
</head>
  <body>
<div id="outer">
<div id="page">
<div id="header">
<h1>Reacheasy</h1>
  <ul id="nav">
    <li class="current"><a href="index.html">Home</a></li>
     <li><a href="women.html">Women</a></li>
     <li><a href="men.html">Men</a></li>
     <li><a href="children.html">Children</a></li>
     <li><a href="homeandappliances.html">Home&amp;Appliances</a></li>
     <li><a href="visionandsound.html">Vision&amp;Sounds</a></li>
      <li><a href="motoring.html">Motoring</a></li>
      <li><a href="homemore.html">More</a></li>
      <li><a href="homecontact.html">Contact us</a></li>
      <li><a href=" rl.html">Register/Log in</a></li>
  </ul>
</div> <!--end of navigation div -->
</div>

Okay. So lets look at your source output again…

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Reacheasy - Foremost website for easy reach of things globally</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link href="easy.css" rel="stylesheet" type="text/css"/>  
</head>
  <body>
<div id="outer">
<div id="page">
<div id="header">
<h1>Reacheasy</h1>
 
  <ul id="nav">
    <li class="current"><a href="index.html">Home</a></li>
     <li><a href="women.html">Women</a></li>
     <li><a href="men.html">Men</a></li>
     <li><a href="children.html">Children</a></li>
     <li><a href="homeandappliances.html">Home&amp;Appliances</a></li>
 
     <li><a href="visionandsound.html">Vision&amp;Sounds</a></li>
      <li><a href="motoring.html">Motoring</a></li>
      <li><a href="homemore.html">More</a></li>
      <li><a href="homecontact.html">Contact us</a></li>
      <li><a href=" rl.html">Register/Log in</a></li>
  </ul>
 
</div> <!--end of navigation div -->
</div><!--HEADER.PHP ENDS HERE --><div id="navigation">
<ul>
<li>

Note the extra comment i threw in.
Take a look at your source again, and give us the next few lines of it, after the “HEADER.PHP ENDS HERE” bit.

my page source


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Reacheasy - Foremost website for easy reach of things globally</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link href="easy.css" rel="stylesheet" type="text/css"/>  
</head>
  <body>
<div id="outer">
<div id="page">
<div id="header">
<h1>Reacheasy</h1>

  <ul id="nav">
    <li class="current"><a href="index.html">Home</a></li>
     <li><a href="women.html">Women</a></li>
     <li><a href="men.html">Men</a></li>
     <li><a href="children.html">Children</a></li>
     <li><a href="homeandappliances.html">Home&amp;Appliances</a></li>

     <li><a href="visionandsound.html">Vision&amp;Sounds</a></li>
      <li><a href="motoring.html">Motoring</a></li>
      <li><a href="homemore.html">More</a></li>
      <li><a href="homecontact.html">Contact us</a></li>
      <li><a href=" rl.html">Register/Log in</a></li>
  </ul>

</div> <!--end of navigation div -->
</div><div id="navigation">
<ul>
<li>
    
    

That’s the whole thing, start to finish? Okay…you’ve either managed to crash your webserver, or you’ve invented some new way of injecting an <li> into a list that doesnt exist…

HOWEVER. I’m gonna take a first stab at your problem…


$result = mysql_quer[COLOR="Red"][B][U]r[/U][/B][/COLOR]y("SELECT * FROM subjects", $connection);

I’m just a little red let-ter… hovering inside your function name… (Yeah i’m feeling Winnie the Pooh this morning. Sue me.)

PS: You might want to turn error displaying on.


error_reporting(E_ALL);
ini_set('display_errors',1);

ok corrected the query , function , but still same, i will turn on the error display

In your PHP code, I see the following two lines in this order:


<div id="navigation">
.
.
.
</div> <!--end of navigation div -->

Yet the browser output you posted contains the lines in this order:


</div> <!--end of navigation div -->
</div><div id="navigation">

Are you sure you’re pasting the right thing?

houston - look closer at header.php. That file also contains the closing tags you’re referencing.

lostty: Turn on error displaying and see if it spits out an error there. By the way…


        die("Database querry failed: " . mysql_[COLOR="Red"]eror[/COLOR]());

I’m just that little red let~ter… think i found where i belonged to start …

please, ow do i turn on the error(newbie)

Put that at the top of your file.

will i put it in php op/closing tags
cos i kept it blank, and no error is beign highlighted as expressed by other commentator

To begin with, you are opening 3 DIV tags and only closing 2 and then Opening another 1


<div id="outer">
<div id="page">
<div id="header">
...
code
...
</div> <!--end of navigation div -->
</div><div id="navigation">