Click here to Skip to main content
15,897,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Its Give error
Parse error: syntax error, unexpected 's' (T_STRING) in C:\xampp\htdocs\trinextechnology.in\function.php on line 24


What I have tried:

prepare($SELECT);
$stmt->bind_param("s", $email);
$stmt->execute();
$stmt->bind_result($email);
$stmt->store_result();
$rnum = $stmt->num_rows;
if ($rnum==0) {
$stmt->close();
$stmt = $conn->prepare($INSERT);
$stmt->bind_param("ssssii", $fbname, $gender, $email, $mono, $qualification, $subject, $text);
$stmt->execute();
echo "New record inserted sucessfully";
} else {
echo "Someone already register using this email";
}
$stmt->close();
$conn->close();
}
} else {
echo "All field are required";
die();
}
?>
Posted
Updated 23-May-20 6:15am

1 solution

In this line:
PHP
$stmt->bind_param("ssssii", $fbname, $gender, $email, $mono, $qualification, $subject, $text);

The binding string specifies six parameters (four strings, then two integers); but you provide seven parameters. Please check every parameter's type, and build the binding string accordingly.
 
Share this answer
 
v2

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