与えられた少なくとも2つのパラメータ1は、この問題の解決策で私を助けてください見込ん:mysqli_query()
mysqli_queryは()ライン24
に.......与えられた少なくとも2つのパラメータ1を期待しますmysqli_query()は、少なくとも2つのパラメータ1がオンラインに.......少なくとも2つのパラメータ1は、所定の()ライン上....... 24
mysqli_queryを与え期待期待24
<?php
if (isset($_POST['submit']))
{
$db_server = "localhost";
$db_user = "root";
$db_pass = "";
$db_name = "rms_db";
$db = new mysqli($db_server, $db_user, $db_pass, $db_name);
if($db->connect_errno){
echo "Could not connect to database";
}
//Import uploaded file to Database
$file_CSV = fopen($_FILES['filename']['tmp_name'], "r");
while (($data = fgetcsv($file_CSV, 1000, ",")) !== FALSE) {
mysqli_query("INSERT into stinfo (ibsn, name, ftname,mtname, sex, birth,religion, nationality, phone,email, bio, address, joined)
values('$data[0], '$data[1]', '$data[2]','$data[3]','$data[4]', '$data[5]', '$data[6]','$data[7]', '$data[8]', '$data[9]','$data[10]', '$data[11]', NOW())");
}
fclose($file_CSV);
//print "Import done";
echo "<script type='text/javascript'>alert('Successfully Imported a CSV File for User!');</script>";
echo "<script>document.location='index.php'</script>";
//view upload form
}
?>
あなたはあきらめましたか? – AbraCadaver