| Server IP : 61.19.30.66 / Your IP : 216.73.216.59 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/gpa/ |
Upload File : |
<html>
<head>
<title>ThaiCreate.Com PHP & MySQL (mysqli)</title>
</head>
<body>
<?php
ini_set('display_errors', 1);
error_reporting(~0);
$serverName = "localhost";
$userName = "root";
$userPassword = "klw3322";
$dbName = "klw";
$conn = mysqli_connect($serverName,$userName,$userPassword,$dbName);
for ($i = 1; $i<= (int)$_POST["hdnCount"]; $i++){
if(isset($_POST["studid"]))
{
if($_POST["studid$i"] != ""
$_POST["ca1$i"] != ""
$_POST["ca2$i"] != ""
$_POST["ca3$i"] != ""
$_POST["ca4$i"] != ""
$_POST["ca5$i"] != "")
{
$sql = "INSERT INTO capacity (idca,studid,subid,ca1,ca2,ca3,ca4)
VALUES ('".$_POST["studid$i"]."','".$_POST["ca1$i"]."','".$_POST["ca2$i"]."'
,'".$_POST["ca3$i"]."','".$_POST["ca4$i"]."','".$_POST["ca5$i"]."')";
$query = mysqli_query($conn,$sql);
}
}
}
echo "Record add successfully";
mysqli_close($conn);
?>
</body>
</html>