TechnoPanda
30-07-2009, 07:03 PM
<?php
session_start();
// Search
require ("connect.php");
require("functions.php");
include("template/header.php");
$term = $_POST['title'];
$sql = mysql_query("select * from songs where artist like '%$term%' ORDER BY `id` DESC");
while ($list = mysql_fetch_array($sql)){
echo "<style type=\"text/css\">
#tweet {
margin-left: -100px;
float: right;}
#box {
width: 600px;}
</style>";
echo "<br/><div id=\"box\"><div id=\"img\"><img align=\"left\" src=\"images/image.jpg\" width=\"71px\" height=\"72px\" /></div>";
echo "<div id=\"tweet\"><a href=\"#\">Tweet It!</a><br/><br/></div>";
echo $list['song'];
echo "<br/>Artist:";
echo $list['artist'];
echo "<br/><textarea rows=\"1\" cols=\"32\">http://mysite.com/?pwd=";
echo $list['pwd'];
echo "</textarea>";
echo "<br/><br/>";
echo "</div>";
} // end while
include("template/footer.php");
?>
Can someone add pagination to this script for me so it appears like this:
<< 1 2 3 4 5 6 etc. >>
session_start();
// Search
require ("connect.php");
require("functions.php");
include("template/header.php");
$term = $_POST['title'];
$sql = mysql_query("select * from songs where artist like '%$term%' ORDER BY `id` DESC");
while ($list = mysql_fetch_array($sql)){
echo "<style type=\"text/css\">
#tweet {
margin-left: -100px;
float: right;}
#box {
width: 600px;}
</style>";
echo "<br/><div id=\"box\"><div id=\"img\"><img align=\"left\" src=\"images/image.jpg\" width=\"71px\" height=\"72px\" /></div>";
echo "<div id=\"tweet\"><a href=\"#\">Tweet It!</a><br/><br/></div>";
echo $list['song'];
echo "<br/>Artist:";
echo $list['artist'];
echo "<br/><textarea rows=\"1\" cols=\"32\">http://mysite.com/?pwd=";
echo $list['pwd'];
echo "</textarea>";
echo "<br/><br/>";
echo "</div>";
} // end while
include("template/footer.php");
?>
Can someone add pagination to this script for me so it appears like this:
<< 1 2 3 4 5 6 etc. >>