Search Engine
| From: | Dhaval Desai | Date: | Sat, 07 Oct 2000 20:38:21 +0000 |
| Subject: | Search Engine | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19056@lists.php.net to get a copy of this message | ||
Hi
Guys This is my code..: I want a maximum of ten
entrieds to display..Howz that possible..and then I
want other 10 to display when I click nex link which
has to be added
<?php
$connect = mysql_connect();
$query = "select * from news ORDER BY date DESC ";
$news = mysql_db_query("website", $query);
$i == 0;
while ($newsx = mysql_fetch_array($news))
{
if($i == 6)
{
break;
}
$i++;
$title = $newsx['title'];
$author = $newsx['author'];
$body = $newsx['body'];
$id = $newsx['id'];
$date = $newsx['date'];
echo "<b>$id</b>";
echo "<a
href=\"innernews.php3?id=$id\"<b>$title</b></a>" .
"<br>";
echo "$date" . "<br>";
echo "<b>$author</b>" . "<br><br>";
}
?>
Thank You in advance
Dhaval Desai
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/