asad_black Posted February 17, 2009 Share Posted February 17, 2009 this my code in this searching is perform now i want to do paging. <?php $var = @$_GET['q'] ; $trimmed = trim($var); $con = mysql_connect("localhost","sample","sample"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("sample", $con); $sql = mysql_query("SELECT * FROM links where kw like \"%$trimmed%\""); echo "<table border=0 cellspacing=5>"; echo "<tr>"; while($row = mysql_fetch_array($sql)) { echo "<td class=style28 width=200>"; echo "<center>"; echo $row['text'];// here we will insert of the description echo"</center>"; echo "<a href=\"" . $row["link"] . "\"><br> <center><img src=\"" . $row["image"] . "\" height='80' width='80' border=0 alt=\"" . $row["text"] . "\"> </a>" ; echo $row['des'];// here we will insert of the description echo "</center>"; echo "</td>"; } echo "</tr>"; echo "</table>"; mysql_close($con); ?> Link to comment https://forums.phpfreaks.com/topic/145535-how-to-do-paging-in-a-php/ Share on other sites More sharing options...
Mchl Posted February 17, 2009 Share Posted February 17, 2009 http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/145535-how-to-do-paging-in-a-php/#findComment-764064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.