ขอบคุณมากครับ แต่ข้างบนมันใช้ยังไง เหมือนจะใช้งานง่ายขึ้นเยอะเลย สุดยอด
ส่วนนี้ให้คุณดูโพสต์ทั้งหมดของสมาชิกท่านนี้ (เฉพาะโพสต์ในส่วนที่คุณมีสิทธิ์เข้าถึง)
เมนู แสดงโพสต์select ct_count,cat_name FROM an_member INNER JOIN an_catalog on an_member.cat_id = an_catalog.cat_id WHERE an_catalog.cat_name ='TEST';


<table class="tg" width="100%">
<tr>
<th style="width: 17%" class="tg-031e"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
<th style="width: 17%" class="tg-yw4l"></th>
</tr>
<tr>
<?php
while ( $result = mysqli_fetch_array($CHRow ) ) {
?>
<td class="tg-yw4l">
<div class="box">
<h4 class="title"><?php echo $result['cat_name'] ?></h4>
</div>
</td>
<?php
}?>
</tr>
</table>

<?php if(isset($_GET['page']) && (isset($_POST['catalog_n']))) {
$G_Page =$_GET['page'];
$G_Cat =$_POST['catalog_n'];
$G_Chapter = $_POST['chapter_n'];
if($G_Chapter < $getmaxchapter){
$TEXT1 = "หน้าหน้าถัดไป";
$G_Chapter+=1;
echo $G_Chapter;
}
else
{
$G_Chapter-=1;
$TEXT1 = "ก่อนหน้า";
echo $TEXT1.$G_Chapter;
}
}
?>
ตรงนี้จะส่งค่าไปที่ไหนยังไงดีแล้วให้โหลดแสดงผลหน้าเดิมโดยใช้ตัวแปรจากด้านบนรับค่ามาครับ
<form id="form1" method="post" action="<?php echo "chapterpage.php?page=".$G_Cat." ".$G_Chapter; ?>" >
<input name ="catalog_n" id ="catalog_n" type="hidden"
value="<?$catalog_n = $G_Cat;?>"/>
<input name ="chapter_n" id = "chapter_n" type="hidden"
value="<?$chapter_n= $G_Chapter;?>"/>
<p align="center"><input type="submit" class="btn btn-primary" value="<?php echo $TEXT1 ?>"></p>
</form>