Code: Select all
Like this:
News Heading 1 - Date1
Description-1
---------------------------------
News Heading 2 - Date 2
Description 2
etc....Code: Select all
News Heading 1 - Date 1Or I can get this:
Code: Select all
News Heading 1
News Heading 2
News Heading 3
Date1
Date2
Date3
Description 1
Description 2
Description 3
etc.....Here is the php that controls the data:
Code: Select all
<?php
$username = "root";
$password = "";
$hostname = "localhost";
$select = "SELECT header,date,description FROM news";
$dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");
print ("Connected to MySQL<br>");
$selected = mysql_select_db("biglakebaptist",$dbh) or die("Could not select biglakebaptist");
print ("Selected biglakebaptist<br>");
$result = mysql_query($select) or die("Could not select news");
print ("Selected news table<br>");
while($col=mysql_fetch_assoc($result))
{
$header[] = $col['header'];
$date[] = $col['date'];
}
foreach ($header as $value) {
}
mysql_close($dbh);
?>Then on news.php I just call this script and place the following:
Code: Select all
Heading: <?php $value ?>--
Greg