Thealfrin
02-12-2005, 05:16 PM
Ok so i have code that gets a title and content out of a table, it was original called "news, i then created a new table with the same info except it was called ems_news.
I changed what i thought needed to be changed in this code
<?php $page_title = "Title Here";
include 'library/config.php';
include 'library/opendb.php';
$query="SELECT * FROM `ems_news`;
$news = mysql_query($query);
$num = mysql_numrows($news);
mysql_close();
?>
<!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>CSS Page Template - Three Column Pixel Perfect - Header
& Footer</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css"
href="css/first.css" />
</head>
<body>
<?php include '/includes/header.php'; ?>
<div id="c-block">
<div id="c-col">
<h3 align="center">Three Column Pixel Perfect with Header &
Footer - MK 1</h3>
<div align="center" style="color:red;">Ver 2.3</div>
<p> This program is intended to be free under the GPL/GNU liceansing and Should for <strong>NO</strong> reason whatsoever be sold at any price. The program is fully commented and should stay that way. </p>
<p> The only place in which I allocate this source to be publicly developed is at <a href="http://www.beta-projects.org" title="Beta Projects" target="_blank">Beta-Projects</a>. I would appreciate it if you kept the copyright notice on the bottom of this page when installing this on your website.</p>
<p>Also this site is built on donations and any would be appreciated. </p>
<p> </p>
<hr />
<?php
$i=$num;
while ($i <= $num && $i > 0){
$title=mysql_result($news,$i,"title");
$content=mysql_result($news,$i,"content");
echo "<strong>$title</strong><br />$content<br /><br />";
$i--;
}
?>
<br />
</div>
<!-- end of center column -->
</div>
<!-- end c-block -->
<div id="ftr" align="center">
<p>©Copyright MamerCorp 2005 </p>
</div>
<!-- left column -->
<div id="lh-col">
Navigation <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- end of left column -->
<!-- right column -->
<div id="rh-col"><br />
<h4 align="center">Right Column</h4>
<p align="center">More links?<br />
Advertisements?</p>
</div>
<!-- end of right column -->
</body>
</html>
Any help?
I changed what i thought needed to be changed in this code
<?php $page_title = "Title Here";
include 'library/config.php';
include 'library/opendb.php';
$query="SELECT * FROM `ems_news`;
$news = mysql_query($query);
$num = mysql_numrows($news);
mysql_close();
?>
<!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>CSS Page Template - Three Column Pixel Perfect - Header
& Footer</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css"
href="css/first.css" />
</head>
<body>
<?php include '/includes/header.php'; ?>
<div id="c-block">
<div id="c-col">
<h3 align="center">Three Column Pixel Perfect with Header &
Footer - MK 1</h3>
<div align="center" style="color:red;">Ver 2.3</div>
<p> This program is intended to be free under the GPL/GNU liceansing and Should for <strong>NO</strong> reason whatsoever be sold at any price. The program is fully commented and should stay that way. </p>
<p> The only place in which I allocate this source to be publicly developed is at <a href="http://www.beta-projects.org" title="Beta Projects" target="_blank">Beta-Projects</a>. I would appreciate it if you kept the copyright notice on the bottom of this page when installing this on your website.</p>
<p>Also this site is built on donations and any would be appreciated. </p>
<p> </p>
<hr />
<?php
$i=$num;
while ($i <= $num && $i > 0){
$title=mysql_result($news,$i,"title");
$content=mysql_result($news,$i,"content");
echo "<strong>$title</strong><br />$content<br /><br />";
$i--;
}
?>
<br />
</div>
<!-- end of center column -->
</div>
<!-- end c-block -->
<div id="ftr" align="center">
<p>©Copyright MamerCorp 2005 </p>
</div>
<!-- left column -->
<div id="lh-col">
Navigation <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- end of left column -->
<!-- right column -->
<div id="rh-col"><br />
<h4 align="center">Right Column</h4>
<p align="center">More links?<br />
Advertisements?</p>
</div>
<!-- end of right column -->
</body>
</html>
Any help?