saad|_d3vil Posted August 31, 2008 Share Posted August 31, 2008 Hi i have make a database table and i inserted table in the website on this site http://www.maza4fun.com/joke/ the table is too big now i want to make 2 or 3 page so table get short . how i do this i have paste code here <?php $con = mysql_connect("localhost","apnimusk","password"); if (!$con){ die('Could not connect: ' . mysql_error()); } mysql_select_db("apnimusk_other", $con); if(isset($_GET['id']) && is_numeric($_GET['id'])){ $result = mysql_query("SELECT * FROM `joke` WHERE `id` = '".$_GET['id']."'"); echo "<table border='1'> <tr> </tr>"; while($row = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>" . $row['text'] . "</td>"; echo "</tr>"; } echo "</table>"; }else{ $result = mysql_query("SELECT * FROM `jokes`"); echo "<table border='1'> <tr> <th>Jokes</th> </tr>"; while($row = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>" ."<a href='?id=".$row['id']."'>".$row['name']."</a>" . "</td>"; echo "</tr>"; } echo "</table>"; } mysql_close($con); ?> thank in advance Link to comment https://forums.phpfreaks.com/topic/122091-divided-data-into-page/ Share on other sites More sharing options...
saad|_d3vil Posted August 31, 2008 Author Share Posted August 31, 2008 i want to make page in id like http://www.maza4fun.com/joke/?id=page1 Link to comment https://forums.phpfreaks.com/topic/122091-divided-data-into-page/#findComment-630339 Share on other sites More sharing options...
DarkWater Posted August 31, 2008 Share Posted August 31, 2008 Dude, stop reposting the same topic like, twice a day. It's really annoying. Are you asking for pagination? I never understand your question. Link to comment https://forums.phpfreaks.com/topic/122091-divided-data-into-page/#findComment-630347 Share on other sites More sharing options...
saad|_d3vil Posted August 31, 2008 Author Share Posted August 31, 2008 now i will not post any message ok fine Link to comment https://forums.phpfreaks.com/topic/122091-divided-data-into-page/#findComment-630350 Share on other sites More sharing options...
Fadion Posted August 31, 2008 Share Posted August 31, 2008 I remember i posted in an exact topic yesterday. You could just "bump" the old topic if you wanted attention, but still you will need to explain clearly what you want to achieve. If your question is about pagination, then take a look here and see what you can find. Link to comment https://forums.phpfreaks.com/topic/122091-divided-data-into-page/#findComment-630351 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.