|
|
|
รบกวนสอบถามหน่อยค่ะ เมื่อคลิก button แล้วค่าจาก radio ที่ checked มันไม่ส่งค่า จะต้องเขียนคำสั่งในรูปแบบไหนคะ |
|
|
|
|
|
|
|
code
Code (PHP)
<table width=100% border="1" cellpadding="1" class="table">
<thead bgcolor="#6699CC">
<tr>
<th width="60%" rowspan="2" style="text-align:center;"><?php echo $rows['bookfGroupName']; ?></th>
<th colspan="4" ><div align="center">ระดับชั้น</div></th>
<th colspan="2" ><div align="center"><?php echo "ประเภท";?></div></th>
</tr>
<tr>
<th width="8%" >ป.1-3</th>
<th width="8%" >ป.4-6</th>
<th width="8%" >ม.1-3</th>
<th width="8%" >ม.4-6</th>
<th width="5%" ><div align="center">เดี่ยว</div></th>
<th width="5%" ><div align="center">ทีม</div></th>
</tr>
</thead>
<?php
$query2 = "select bookf_detail.bookfTypeNo,bookfTypeName,typeid,bookfClassNo,
sum(case when bookfClassNo = '11' then bookfClassNo end) as C11,
sum(case when bookfClassNo = '20' then bookfClassNo end) as C20,
sum(case when bookfClassNo = '21' then bookfClassNo end) as C21,
sum(case when bookfClassNo = '22' then bookfClassNo end) as C22,
sum(case when bookfClassNo = '30' then bookfClassNo end) as C30,
sum(case when bookfClassNo = '31' then bookfClassNo end) as C31,
sum(case when bookfClassNo = '32' then bookfClassNo end) as C32,
sum(case when bookfClassNo = '41' then bookfClassNo end) as C40
FROM bookf_detail inner join bookftype on bookf_detail.bookfTypeNo= bookftype.bookfTypeNo where bookfGroupNo = '".$rows['bookfGroupNo']."' group by bookf_detail.bookfTypeNo order by bookfTypeNo asc"; }
$result2 = mysql_query($query2);
$i = 0;
$n=1;
while($rows2 = mysql_fetch_assoc($result2))
{
$i++;
$TypeNo= $rows2['bookfTypeNo'];
$T = $rows2['typeid'];
$TypeName = $rows2['bookfTypeName'];
$c11 = $rows2['C11'];
$c20 = $rows2['C20'];
$c21 = $rows2['C21'];
$c22 = $rows2['C22'];
$c30 = $rows2['C30'];
$c31 = $rows2['C31'];
$c32 = $rows2['C32'];
?>
<tbody>
<tr>
<td><?php echo substr($rows['bookfGroupName'],0,2).$n++." ".$TypeName; ?></td>
<td
><div align="center"><input name="ckClass[<?php echo $TypeNo?>;]" type="radio" id="ck11" value="11" />
</div>
</td>
<td
><div align="center"><input name="ckClass[<?php echo $TypeNo?>;]" type="radio" id="ck20" value="20" /></div>
</td>
<td
><div align="center"><input name="ckClass[<?php echo $TypeNo?>;]" type="radio" id="ck21" value="21" /></div>
</td>
<td
><div align="center"><input name="ckClass[<?php echo $TypeNo?>;]" type="radio" id="ck22" value="212" /></div>
</td>
<td width="8%"><?php if($T=="0") { ?><div align="center"><a href="index.php?Register=<?php echo $TypeNo;?>&bGroup=<?php echo $GroupNo;?>&mType=<?php echo $T?>&mClass=<?php echo $_POST['ckClass']?>" title="คลิกสมัคร <?php echo $TypeName;?>"> <button type="button" class="btn btn-info">สมัคร</button></a></td><?php } ?>
<td width="8%"><?php if($T=="1") { ?><div align="center"><a href="index.php?Register=<?php echo $TypeNo;?>&bGroup=<?php echo $GroupNo;?>&mType=<?php echo $T?>&mClass=<?php echo $_POST['ckClass']?>" title="คลิกสมัคร <?php echo $TypeName;?>">
<button type="button" class="btn btn-info">สมัคร</button><?php } ?>
</a></div></td>
</tr>
</tbody>
<?php
} ?>
</table>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2015-06-04 08:48:16 |
By :
K927 |
View :
709 |
Reply :
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ระบบแข่งขันวิชาการหรือเปล่าครับ
|
|
|
|
|
Date :
2015-06-06 10:47:49 |
By :
LAGO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ผมเคยทำไว้อยู่ของระบบกลุ่ม
|
|
|
|
|
Date :
2015-06-06 14:10:50 |
By :
LAGO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|