dimanche 1 juin 2014

creating links without making new html/php pages?


Vote count:

0




Hello I just got my first website up and running here at http://ift.tt/1rxIQdr My question was how can I make direct links to the specific news content? I'd like to make a link where it says Posted: June 1, 2014, 12:24 am and I'd like to make it to to another link where it only has that news article. like http://ift.tt/1m2UNPL


each news topic is made in php with this code $query = "SELECT * FROM post ORDER BY Date DESC LIMIT 5"; $result = mysqli_query($link, $query);



while($row = $result->fetch_array()) {
echo '<article class="content grid_8">';

$row_date = strtotime($row['date']);
$the_date = date("F j, Y, g:i a" , $row_date);


echo '<h1>';
echo utf8_encode($row['title']);
echo '</h1>';

echo '<section>';

echo '<div class="info_block">';
echo "Posted: $the_date";
echo '</div>';
echo '<hr style="BORDER-RIGHT: medium none; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; HEIGHT: 1px"> ';
echo '<br>';

echo nl2br(stripslashes(utf8_encode($row['post'])));
echo '</section>';
echo '</article>';

}
echo '<div class="grid_8">';
echo '<b><a href="index.php?page=newsarchive">News Archive</a></b>';
echo '</div>';


?>


asked 37 secs ago






Aucun commentaire:

Enregistrer un commentaire