<?php $rs = mysql_query($sql)or die(mysql_error()); $i=0; while($row = mysql_fetch_array($rs)) { $i++; ?> <tr> <td align="center"><?php echo $i;?></td> <td><?php echo $row['question']?></td> <td align="center"><input type="radio" name="<?php echo "ch".$i;?>" value="4" /></td> <td align="center"><input type="radio" name="<?php echo "ch".$i;?>" value="3" /></td> <td align="center"><input type="radio" name="<?php echo "ch".$i;?>" value="2" /></td> <td align="center"><input type="radio" name="<?php echo "ch".$i;?>" value="1" /></td> </tr> <?php } ?> <tr> <td> <input type="hidden" name="evaluation" value="<?php echo $num_rows['evaluation_id']; ?>" /></td> <td><input type="submit" value="ส่งข้อมูล"/></td> </tr>
<?php include "connect.php"; $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); $ch = $_POST['ch']; for($q=0;$q<count($ch);$q++) { $insert="insert into answer (answer_id,score) values('".($q+1)."','".$ch[$q]."')"; $result=mysql_query($insert)or die(mysql_error()); } if ($result) { echo "ประเมินเรียบร้อย"; } else { echo "ประเมินไม่ได้"; } ?>
<input type="radio" name="ch[]"value="4" /></
<input type="radio" name="<?php echo "ch[]".$i;?>" value="4" /> <input type="radio" name="<?php echo "ch[]".$i;?>" value="3" /> <input type="radio" name="<?php echo "ch[]".$i;?>" value="2" /> <input type="radio" name="<?php echo "ch[]".$i;?>" value="1" />
$insert="insert into answer (answer_id,score) values('','".$ch[$q]."')";
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง