Jump to content

Recommended Posts

ok so i have a list of the articles and dates in this code:

<?php
require_once('connect.php');
$query=mysql_query("SELECT date,title FROM news ORDER BY date desc") or die(mysql_error());
while($row=mysql_fetch_object($query))
{
$date1=$row->date;
$title=$row->title;
$date=date('m-d-Y',strtotime($date1));
echo $date;
echo " ";
echo $title;
echo "<br>";
}
?>

I want to have a link for each code to the corresponding article and all the articles use the same template

each article is a different row in mysql

how do i do this?

Link to comment
https://forums.phpfreaks.com/topic/56886-solved-need-help-with-templates/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.