http://cindango.com/v1/index.php?page=archive
ok that is the archive I have, if you roll your mouse over each link you'll see that it's http://cindango.com/v1/viewnews.php?newdid=SOMENUMBER
now, what I want is to be able to click any of those article dates and take me to that specific article, each with it's unique newsid. But I don't know how to show that certain news article after I click that link..here is the code for viewnews.php:
notice when you click a date you get an error, anybody have any ideas??
thanks.
$hostname = "mysql.mygisol.com";
$username = "sdfasfasdfsdf";
$password = "fsafsdsdfsdfsadf";
$db = "cindang_news";
//Connect to the database server
mysql_connect($hostname, $username, $password) OR DIE("Could not connect to the news database.");
// Tell the database server what database you want to use
mysql_select_db($db) or die("Error selecting News database.");
// setup a query variable to ask the database for some information
$query = "SELECT * ID FROM news ORDER BY date";
// acctualy ask for the info & store it in $results
$result = mysql_query($query) or die("Could not store database info in temporary results.");
print ('');
// create a loop through the database results
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
$dateposted = $row['date'];
$datetoprint = date("F j, Y ~ g:i a",strtotime($dateposted));
$linebreak = $row['newsdata'];
echo "<font color=#808080 size=1>Posted $datetoprint</font>";
echo "<br>";
echo nl2br($linebreak);
echo "<p>";
}
echo '<a href="javascript:history.back(1)">Back</a>';