|
 |
|
จะส่งค่าผ่าน multiple checkbox อ่ะค่ะ แต่มันไม่ไป ส่งr_id ไปกับ chkDel อ่ะค่ะ แต่ไม่ไป |
|
 |
|
|
 |
 |
|
Code (PHP)
<? include("../header_agen.php");?>
<div id="content">
<div id="maincontent">
<div class="block">
<h2>รายการจอง</h2>
<? include("../system-msg.php");?>
<form name="status" id="status" method="post" action="change_status.php" class="big">
<table width="625" class="data">
<!--DWLayoutTable-->
<thead>
<tr>
<input type="submit" name="waiting" value="รอการชำระเงิน" class="">
<input type="submit" name="confirm" value="ชำระเงินแล้ว" class="">
<input type="submit" name="cancle" value="ยกเลิก" class="b">
<th width="66" height="21" valign="top" class="medium"></th>
<th width="66" height="21" valign="top" class="medium">ชื่อผู้จอง</th>
<th width="85" valign="top" class="medium">รหัสการจอง</th>
<th width="118" valign="top" class="medium">รหัสแพ็คเกจทัวร์</th>
<th width="110" valign="top" class="medium">ชื่อแพ็คเกจทัวร์</th>
<th width="90" valign="top" class="medium">จำนวนที่จอง</th>
<th width="59" valign="top" class="medium">วันที่จอง</th>
<th width="48" valign="top" class="medium">สถานะ</th>
<th width="1"> </th>
<?php /*?> <th colspan="2" valign="top" class="medium">action</th><?php */?>
</tr>
</thead>
<tbody>
</form>
<?
include("../../include/connectdb.php");
// select data by pageignition
$q="select member.*,reserve.*,packages.*,FROM_UNIXTIME(r_created, '%M %d, %Y' ) as r_fcreated from member,reserve,packages where member.m_id=reserve.r_mid and reserve.r_pkid=packages.pk_id and pk_aid=".$_SESSION["id"]."";
$q.=" ORDER BY r_id";
$qr=mysql_query($q);
$total=mysql_num_rows($qr);
$e_page=10; // total rows per page
//Call function pageignition
include("../../include/page_function.php");
$numrows = mysql_num_rows($result);
if($numrows){
while($row=mysql_fetch_array($result)){
?>
<tr>
<td valign="top"><input type="checkbox" name="chkDel[]" value="<?=$row["r_id"];?>"></td>
<td height="21" valign="top"><strong><?=htmlspecialchars($row['m_fname']." ".$row['m_lname']);?>
</strong></a></td>
<td valign="top" class="a-center"><?=$row['r_id'];?></td>
<td valign="top" class="a-center"><?=$row['r_pkid'];?></td>
<td valign="top" class="a-center"><?=$row['pk_name'];?></td>
<td valign="top" class="a-center"><?=$row['r_adult']+$row['r_child'];?></td>
<td valign="top" class="a-center"><?=$row['r_fcreated'];?></td>
<td valign="top" class="a-center"><?=$row['r_status'];?></td>
<td> </td>
<?php /*?> <td colspan="3" valign="top" class="a-center bt_action">
<a href="pk-update.php?id=<?=$row['pk_id'];?>" title="Open" class="open action">✂</a>
<a href="delete.php?type=pk&id=<?=$row['pk_id'];?>" title="delete" class="delete action">✖</a> </td><?php */?>
</tr>
<? }
} else{?>
<tr>
<td height="21" colspan="7" valign="top">ไม่มีข้อมูลการจอง</td>
<td></td>
<? } ?>
</tbody>
<tbody>
<tr>
<td height="21" colspan="7" valign="top">
<!--<a href="bc-create.php" class="button">Create news category</a>-->
<?=$numrows;?>
ข้อมูลการจองอยู่ในระบบ </td>
<td></td>
</tr>
</tbody>
</table>
<div class="browse_page f-right">
<?
// Pagignition call function and display
include("../../include/pageignition.php");
page_navigator($before_p,$plus_p,$total,$total_p,$chk_page);
?>
</div>
</div>
</div>
<? include("../../right-sidebar.php");?>
</div>
<? include("../../footer.php");?>
Code (PHP)
<? include("../header_agen.php");?>
<? if(!isset($_REQUEST['submit'])){ ?>
<div id="content">
<div id="maincontent">
<div class="block">
<h2>รายการจอง</h2>
<? include("../../include/connectdb.php");
if($_POST["submit"] == "waiting"){
for($i=0;$i<count($_POST["chkDel"]);$i++)
{
if($_POST["chkDel"][$i] != "")
{
$q = "UPDATE reserve SET r_status = 0";
$q.="WHERE r_id = '".$_POST["chkDel"][$i]."' ";
$qr = mysql_query($q);
echo" เปลี่ยนสถานะแล้ว";
}
}
}
echo ".";
?>
<? }?>
</div>
</div>
<? include("../../right-sidebar.php");?>
</div>
<? include("../../footer.php");?>
ส่งr_id ไปกับ chkDel อ่ะค่ะ แต่ไม่ไป
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2010-03-09 15:29:31 |
By :
vanjai |
View :
916 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าไม่มีต้องแก้ตรงไหนอ่ะคะ
|
 |
 |
 |
 |
Date :
2010-03-10 12:28:32 |
By :
vanjai |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|