Click here to Skip to main content
14,695,532 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello i have this piece of code


$sql = "INSERT INTO tblLecturer (lec_id,lec_lastname,lec_firstname) VALUES (?, ?, ?)";

if (!($stmt = $mysqli->prepare($sql))) {
die("Prepare failed: ".$mysqli->errno);
}

if (!$stmt->bind_param('sss', $id, $lname, $fname)){
die("Binding parameters failed: ".$stmt->errno);
}

if (!$stmt->execute()) {
die("Insert registration table failed: ".$stmt->errno);
}

I am getting a fatal error here: if (!($stmt = $mysqli->prepare($sql))) {
I don't know whats wrong with this code..
Any help plzz
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900