PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am currently trying to fix a bug in a requests system which I have designed in PHP for my radio stations new website.
In a nutshell:
There is a text field (part of a form) which the user fills in. Upon pressing submit, the user is then presented with the search results (from an SQL Query, using a MYSQL database). This is a self driven PHP page.
while($row = mysql_fetch_array($result))
{
echo '<form method = "POST" action = "check_request.php">';
echo '<table border = "">';
echo '<tr>';
echo '<td width = "200">';
// echo $row['title'];
$item = $row['Title'];
$artistFirstName = $row['Name'];
$artistSurname = $row['Surname'];
$artistFullName = $artistFirstName. " ".$artistSurname;
echo '<input type = "hidden" name = "song_name" value = " '. $item.' ">';
echo $item;
echo '</td>';
echo '<td>';
echo '<input type = "hidden" name = "artist" value = " '.$artistFullName.'">';
echo $artistFullName;
echo '</td>';
/*echo '<td>';
echo $row['content'];
echo '</td>';
*/
echo '<td>';
echo '<input type = "submit" name = "submit" value = "Request It Now ">';
echo '</td>';
echo '</tr>';
echo '</table>';
My dilemna is that I would like to see only 5 results per page. I understand that we have to use something called Pagination, but have no idea how to go about it, and can't find any simple examples on the t'internet.