Hi guys,
i've been trying to write a small script that acts basically as a CMS for one page of a website. Currently theres a test version running on another server, and not the live site. So far i'm only concerned with getting the script up and running, the security will fall in later i'm hoping.
The page appears to be sort of working, by which I mean, there is already test data in the database, and its only pulling out one field - the date, but there are 13 fields in total that I need to extract.
Can anyone see what's wrong with the code aside from the mess and confusion cause by lack of tabbing?
<html>
<head>
<title>Annadale Hockey Club</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../style/style.css">
<link rel="shortcut icon" href="../images/favicon.ico">
</head>
<!--Banner-->
<div id="banner" class="banner">
<img src="../images/banner.jpg">
</div>
<!--Links-->
<div id="title" class="links">
<a href="../index.htm">Home</a>
<a href="../mens/mens.htm">Mens</a>
<a href="../ladies/ladies.htm">Ladies</a>
<a href="../juniors/juniors.htm">Juniors</a>
<a href="../archives/archives.htm">News</a>
<a href="../events/events.htm">Events</a>
<a href="../history/history.htm">History</a>
<a href="../links/links.htm">Links</a>
<a href="../shop/shop.htm">Shop</a>
<a href="../contacts/contacts.htm">Contacts</a>
</div>
<!--Hot Links-->
<div id="sublinks" class="sublinks">
<a href="mens.htm">Men's Home</a>
<a href="nextweeks.htm">Next Week's Fixtures</a>
<a href="lastweeks.htm">Last Week's Results</a>
<a href="fixturelist.htm">Fixture List</a>
<a href="training.htm">Training</a>
<a href="topgoalscorers.htm">Top Goalscorers</a>
<a href="gallery.htm">Gallery</a>
</div>
<!--Content-->
<div id="text" class="text">
<?
include("dbconnect.php");
$getnews = mysql_query("SELECT * FROM mynews LIMIT 0,5");
while($r=mysql_fetch_array($getnews)){
extract($r);
echo("
<p>Weekend of $date <br>
<br>
<strong>1st XI vs. $1stopposition </strong><br>
Scorers: $1stscorers <br>
</p>
<p><br>
<strong>2nd XI vs. $2ndopposition </strong><br>
Scorers: $2ndscorers <br>
</p>
<p><br>
<strong>3rd XI vs. $3rdopposition </strong><br>
Scorers: $3rdscorers <br>
</p>
<p><br>
<strong>4th XI vs. $4thopposition </strong><br>
Scorers: $4thscorers <br>
</p>
<p><br>
<strong>5th XI vs. $5thopposition </strong><br>
Scorers: $5thscorers <br>
</p>
<p><br>
<strong>6th XI vs. $6thopposition </strong><br>
Scorers: $6thscorers </p>
");
}
?>
</div>
</body>
</html>
I've tried changing the field names from "1st_opposition" to "1stoppotion" but this has had no bearing on the outcome...
any help greatly appreciated!