|
|
|
เก็บข้อมูลลงฐานข้อมูลแล้วเก็บเป็นค่า 0 แทน ต้องแก้ยังไงคะ |
|
|
|
|
|
|
|
ทำได้แล้วค่ะ
Code (PHP)
<?php
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
$objDB = mysql_select_db("db_intern");
mysql_query("SET NAMES UTF8");
$Max = $_POST['Max'];
$Choice = array();
for ($i=0; $i <= $Max; $i++) {
array_push($Choice,$_POST['radio_'.$i]);
$strSQL = "INSERT INTO sum ";
$strSQL .="(score)";
$strSQL .="VALUES";
$strSQL .="('".$_POST['radio_'.$i]."') ";
$objQuery = mysql_query($strSQL);
}
if($objQuery){
echo "Save Done";
}else{
echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
|
|
|
|
|
Date :
2013-08-18 16:10:29 |
By :
gosling |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|