Hello! I did a quick search to see if anyone else had this same error. There were some that were close...but...not this specific one: Parse error: parse error, unexpected ','
This is my code (I'm using mySQL). I know the problem area is on line 15. I've tried just writing Null and then I get another error: Could not insert record: Column count doesn't match value count at row 1/n. Some sources I looked up said it needs to be as I have it below. And this is how I feel --> :eek: <--because I'm not getting anywhere with this error.
Thank you for any help that can be provided!!
<?php
$mysqli = mysqli_connect("localhost", "***", "***", "facultytraining");
if (mysqli_connect_errno()) {
printf("Connect failed: %s/n", mysqli_connect_error());
exit();
} else {
$sql = "INSERT INTO faculty_mod1 (id,
fname,
lname,
center,
score1,
date1)
VALUES ('
",
".$_POST["fname"].",
".$_POST["lname"].",
".$_POST["center"].",
".$_POST["score1"].",
".$_POST["date1"]."
')";
$res = mysqli_query($mysqli, $sql);
if ($res === TRUE) {
echo "A record has been inserted.";
} else {
printf("Could not insert record: %s/n", mysqli_error($mysqli));
}
mysqli_close($mysqli);
}
?>