Hi,
I have created a basic PHP blog-cms and I'm looking for a easy way to implement prev next.
on the blog page.
I know there are several Jquery plugins, also some people use PHP to achieve this...
I'm looking for the more simple and easy way to do it.
I want to display 2 news by page
The code:
<?php
$q = 'SELECT news.user_id,news.date,news.title,news.intro,news.content,news.status,news.visible, CONCAT(users.firstname," ", users.name) AS uname FROM news LEFT JOIN users ON users.id = news.user_id WHERE news.status= 1 AND news.visible=1 AND news.language=1 ORDER BY news.date DESC';
$res = sqlq($q);
while ($r = sqlget($res)) {
echo
'<div> <h5> ' . $r['title'] . '</h5> </div>' .
'<div>' . $r['date'] . ' | ' . $r['uname'] .'</div>' .
'</br>'.
'</br>'.
'<p>'.
'<div>' . $r['intro'] . '</div>' .
'</p>'.
'</br>'.
'<p>'.
'<div>' . $r['content'] . '</div>'.
'</p>'.
'<hr>' ;
} //while
?
Thanks for your help