|
|
|
สอบถามครับ insert ขอมูลแบบวนลูบแต่มันเข้าแค่ข้อมูลลูบสุดท้ายอะครับ |
|
|
|
|
|
|
|
Code (PHP)
$header=$_POST["header"];
$sql = "insert into form values
(NULL,'$form','$email','$header')";
for($x=0;$x<=$_POST["hiddenFieldmax"];$x++)
{
if($_POST["hiddenField{$x}"]=='radio'){
$title=$_POST["title{$x}"];
$type=$_POST["hiddenField{$x}"];
$sqlradio = "insert into title values
(NULL,'$form','$title','$type','$x')";
for($i=0;$i<=count($_POST["radio".$x.""]);$i++)
{
$sup=$_POST["radio".$x.""][$i];
$sqlsupradio = "insert into sup values
(NULL,'$form','$title','$sup','$type','$i')";
}
}
Tag : PHP, MySQL
|
ประวัติการแก้ไข 2014-06-06 19:47:24
|
|
|
|
|
Date :
2014-06-06 19:40:06 |
By :
_Emo_ |
View :
696 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ต้องไปหาความรู้เองใช่ไหมครับ
|
|
|
|
|
Date :
2014-06-06 22:06:09 |
By :
_Emo_ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
for($i=0;$i<=count($_POST["radio".$x.""]);$i++)
{
$sup=$_POST["radio".$x.""][$i];
$sqlsupradio = "insert into sup values
(NULL,'$form','$title','$sup','$type','$i')";
mysql_query($sqlsupradi);
}
}
|
|
|
|
|
Date :
2014-06-06 22:45:36 |
By :
อิอิ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณครับ
|
|
|
|
|
Date :
2014-06-06 22:58:18 |
By :
_Emo_ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|