News Story Preview.. Read more link.
Posted: Tue Aug 05, 2008 4:43 pm
Everah | Please use bbCode tags when posting code in the forums. We have that rule in place for a reason.
I want to only show a preview of the text that is getting pulled from MYSQL, and the have it place a "read more" link. then when you click the link only that story will come uup in a pop up window.
Here is my code:
Please help......
I want to only show a preview of the text that is getting pulled from MYSQL, and the have it place a "read more" link. then when you click the link only that story will come uup in a pop up window.
Here is my code:
Code: Select all
<?php
include("config.php");
$result = mysql_query("SELECT * FROM news ORDER BY newsid DESC",$connect);
$text = $_POST['text1'];
$newtext = wordwrap($text, 8, "\n");
while($myrow = mysql_fetch_assoc($result))
{
$text = $myrow['text1'];
echo "<b>Title: ";
echo $myrow['title'];
echo "</b><br>On: <i>";
echo $myrow['dtime'];
echo "</i><hr align=left width=160>";
echo wordwrap($text, 30, "<br />");
echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a>
|| <br><hr align=left width=160>";
}
?>Please help......