|
|
|
ช่วยดูโค้ดให้หน่อยครับ insert radio botton ไม่ได้ครับ....ช่วยหน่อยน่ะครับ |
|
|
|
|
|
|
|
Code (PHP)
<?php session_start();
include("nusoap/nusoap.php");
include("connect_db.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<form>
<p>
<?
if (isset($_SESSION["page_login"])) {
echo $_SESSION["page_login"];
}
?>
</form>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>แบบประเมินการสอน</title>
<style type="text/css">
<!--
.s { font-weight: bold;
}
.s { font-size: 24px;
}
.s { font-weight: bold;
}
.s { font-weight: bold;
}
.style2 {font-weight: bold; font-size: 18px; }
body,td,th {
font-family: sr FahTHAI;
font-size: 18px;
}
a {
font-family: sr FahTHAI;
font-size: 24px;
}
h1,h2,h3,h4,h5,h6 {
font-family: sr FahTHAI;
}
h1 {
font-size: 24px;
}
.style4 {font-weight: bold; font-size: 24px; font-family: "sr FahTHAI"; }
.style5 {
color: #000000;
font-weight: bold;
}
.style6 {font-family: "sr FahTHAI"}
.style8 {font-family: "sr FahTHAI"; font-size: 18px; }
.style9 {font-size: 18px}
.style10 {color: #FF0000}
-->
</style>
</head>
<body>
<tr>
<td width="39" rowspan="2" align="center"> </td>
</tr><tr><td> </td>
</tr>
<tr>
<form name="ASSESS"action="ASSESS_COMNT.php?COURSECODE=<?=$COURSECODE?>&OFFICERID=<?=$OFFICERID;?>&student_code=<?=$_SESSION["student_code"];?>" method="post" onSubmit="return ChkValid()">
<?
include ("connect_db.php");
$strSQL = "SELECT * FROM TQF ";
$objParse = oci_parse ($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
?>
<p><font face="MS Sans Serif" size="2">
<input type="hidden" name="section" value="00" />
<input type="hidden" name="course_code" value="0000000" />
</font><font face="MS Sans Serif"> <span class="s">
<!--<table border=0 cellspacing=0 cellpadding=0>
<tr><td>1.<span lang="th"> เลขประจำตัว</span></td>
<td><font face="MS Sans Serif" size=1>
<input type=hidden name=id value="000000000000">
<input type=text name=id maxlength=12 size=12 tabindex="1"></td></tr>
<tr><td>2. เพศ</td>
<td><font face="MS Sans Serif" size=1>
<input type=hidden name=gender value="X">
<input type=radio name=gender value=ชาย>ชาย
<input type=radio name=gender value=หญิง>หญิง
</td></tr>
<tr><td> </td>
<td><font face="MS Sans Serif" size=1>
<input type=hidden name=age value="00">
</td></tr>-->
</span></font><span class="style4"><u>ตอนที่ 1 </u>ระดับความพึงพอใจของนักศึกษา </span></p>
<p class="style2"> ระดับความพึงพอใจ 5 = มากที่สุด 4 = มาก 3 = ปานกลาง 2 = น้อย 1 = น้อยมาก </p>
<font face="MS Sans Serif" size="2">
<table border="1" width="982" bgcolor="#bbee99">
<tr bgcolor="#aadd99">
<td colspan="2" rowspan="2" bordercolor="#FF66FF" bgcolor="#FFCCFF"><p align="center" class="style5"><span lang="th" xml:lang="th"><font size="4">รายการการประเมิน</font></span></p></td>
<td height="26" colspan="5" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF"><span lang="th" xml:lang="th"><font size="3">ผลการประเมิน</font></span></td>
</tr>
<?
include ("connect_db.php");
$strSQL = "SELECT * FROM TQF WHERE ROWNUM <= 25 ORDER BY TQF_ID ASC ";
$objParse = oci_parse ($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
echo "$result";
?>
<tr bgcolor="#aadd99">
<td width="73" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF">5</td>
<td width="73" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF">4</td>
<td width="73" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF">3</td>
<td width="73" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF">2</td>
<td width="73" align="center" bordercolor="#FF66FF" bgcolor="#FFCCFF">1</td>
</tr>
<?
$i= 0;
while($objResult = oci_fetch_array($objParse,OCI_BOTH))
{
$i++;
?>
<tr>
<td width="50" align="center" valign="middle" bordercolor="#FF66FF" bgcolor="#FFFFFF"><? echo $i?></td>
<td width="525" height="35" bordercolor="#FF66FF" bgcolor="#FFFFFF" maxlength="1"><?=$objResult["DESCRIPTION"];?> <span class="style10">?</span></td>
<td align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#FF66FF"><input type="radio" name="q_no<?=$i;?>" value="5" /></td>
<td align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#FF66FF"><input type="radio" name="q_no<?=$i;?>" value="4" /></td>
<td align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#FF66FF"><input type="radio" name="q_no<?=$i;?>" value="3" /></td>
<td align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#FF66FF"><input type="radio" name="q_no<?=$i;?>" value="2" /></td>
<td align="center" valign="middle" bgcolor="#FFFFFF" bordercolor="#FF66FF"><input type="radio" name="q_no<?=$i;?>" value="1" /></td>
</tr>
<?
}
?><tr>
<td colspan="7" bordercolor="#FF66FF" bgcolor="#FFCCFF"> </td>
</tr>
</table>
<?
oci_close($objConnect);
?>
</font>
<h4 align="left" class="s"><u><span class="style6">ตอนที่ 2 </span></u> <span class="style6" lang="th" xml:lang="th"> ความคิดเห็นและข้อเสนอแนะต่ออาจารย์/กิจกรรมการเรียนการสอนในวิชานี้</span></h4>
<p>
<font size="2" face="MS Sans Serif">
<label></label>
</font> <span class="style8">แสดงความคิดเห็น (ไม่เกิน 500 ตัวอักษร) </span></p>
<p>
<label>
<font-family: "sr FahTHAI"> <textarea name="Suggestion" type=textarea id="Suggestion" onKeyDown="limitText(this.form.Suggestion,this.form.countdown,5OO);"
onkeyup="limitText(this.form.Suggestion,this.form.countdown,500);" cols="60" rows="9"></textarea></font>
</label>
</p>
<table width="65%" border="0">
<tr>
<th scope="col"><span class="style9">คุณมี
<input name="countdown" type="text" value=" 500 " size="2" readonly />
ตัวอักษร</span></th>
</tr>
</table>
<p align="right"><br />
<font size="1">
<input name="submit" type="submit" value="บันทึกข้อมูลแบบสอบถาม" />
<input name="reset" type="reset" value="ล้างข้อมูล" />
</font></p>
<p></p>
</form>
<script language="javascript" type="text/javascript">
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
</script>
</tr>
<p> </p>
</body>
</html>
code รับค่า
Code (PHP)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<?
echo date("H:i:s");
$dd=date("Y-m-d");
echo $dd;
for($i=0;$i<count($_POST["CHOICEID"]);$i++)
{
echo $_POST["CHOICEID"][$i];
print_r($_POST);
if($_POST["CHOICEID"][$i] != "")
{
}
}
include ("connect_db.php");
$strSQL = "INSERT INTO EVALUATEANSWER ";
$strSQL .="(\"student_code\",\"q_no\",\"COURSECODE\",\"OFFICERID\") ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["STUDENTID"]."','".$_POST["CHOICEID"]."','".$_POST["COURSECODE"]."','".$_POST["OFFICERID"]."')";
$objParse = oci_parse($objConnect, $strSQL);
$objExecute = oci_execute($objParse, OCI_DEFAULT);
if($objExecute)
{
oci_commit($objConnect);
echo"<body onload=\"window.alert(' บันทึกเรียบร้อย..');return history.go(-1)\">";
}
else
{
oci_rollback($objConnect); //*** RollBack Transaction ***//
//echo "Error Save [".$strSQL."";
//echo"<body onload=\"window.alert(' Error Save...!!!');return history.go(-1)\">";
}
oci_close($objConnect);
?>
</body>
</html>
<?php
foreach($_REQUEST as $key => $value) {
echo $key . "=" . $value . "<BR>";
}
?>
Tag : PHP, Oracle, Win (Windows App)
|
|
|
|
|
|
Date :
2012-04-08 13:02:01 |
By :
wa_gon |
View :
899 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ใช้การรับค่าปกติครับ ผ่าน $_GET หรือ $_POST ครับ
|
|
|
|
|
Date :
2012-04-08 20:31:21 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ก็ยังไม่ได้ ครับ ผม...
|
|
|
|
|
Date :
2012-04-11 15:58:01 |
By :
wa_gom |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|