දාපන් බලන්න එරෝර් එක? උදව්වක් දෙන්න පුලුවන්ද බලන්න.
<?php
// Include config file
require_once 'config.php';
// Define variables and initialize with empty values
$username = $password = $confirm_password = $first_name = $last_name = $email = $date_of_birth = $nic = $passport = $marital_state = $children = $residency = $height = $weight = $body_type = $appearance = $skin_colour = $ethnicity = $caste = $religion = $education = $career_sector = $mother_language = $occupation = $social_class = $drinking = $alcohol = $smoking = $diet = $family_values = $personality = $hobbies = $profile_posted_by = $about_me = "";
$username_err = $password_err = $confirm_password_err = $first_name_err = $last_name_err = $email_err = $date_of_birth_err = $nic_err = $passport_err = $marital_state_err = $children_err = $residency_err = $height_err = $weight_err = $body_type_err = $appearance_err = $skin_colour_err = $ethnicity_err = $caste_err = $religion_err = $education_err = $career_sector_err = $mother_language_err = $occupation_err = $social_class_err = $drinking_err = $alcohol_err = $smoking_err = $diet_err = $family_values_err = $personality_err = $hobbies_err = $profile_posted_by_err = $about_me_err = "";
// Processing form data when form is submitted
if($_SERVER["REQUEST_METHOD"] == "POST"){
//validate firstname
if(empty(trim($_POST['first_name']))){
$first_name_err = "Please enter first name.";
} else{
$first_name = trim($_POST['first_name']);
}
//validate lastname
if(empty(trim($_POST['last_name']))){
$last_name_err = "Please enter last name.";
} else{
$last_name = trim($_POST['last_name']);
}
//validate email
if(empty(trim($_POST['email']))){
$email_err = "Please enter email.";
} else{
$email = trim($_POST['email']);
}
//validate date of birth
if(empty(trim($_POST['date_of_birth']))){
$date_of_birth_err = "Please enter date of birth.";
} else{
$date_of_birth = trim($_POST['date_of_birth']);
}
//validate nic
if(empty(trim($_POST['nic']))){
$nic_err = "Please enter NIC.";
} else{
$nic = trim($_POST['nic']);
}
//validate passport
if(empty(trim($_POST['passport']))){
$passport_err = "Please enter passport.";
} else{
$passport = trim($_POST['passport']);
}
//validate marital state
if(empty(trim($_POST['marital_state']))){
$marital_state_err = "Please enter marital state.";
} else{
$marital_state = trim($_POST['marital_state']);
}
//validate children
if(empty(trim($_POST['children']))){
$children_err = "Please enter children.";
} else{
$children = trim($_POST['children']);
}
//validate residency
if(empty(trim($_POST['residency']))){
$residency_err = "Please enter residency.";
} else{
$residency = trim($_POST['residency']);
}
//validate height
if(empty(trim($_POST['height']))){
$height_err = "Please enter height.";
} else{
$height = trim($_POST['height']);
}
//validate weight
if(empty(trim($_POST['weight']))){
$weight_err = "Please enter weight.";
} else{
$weight = trim($_POST['weight']);
}
//validate body type
if(empty(trim($_POST['body_type']))){
$body_type_err = "Please enter body type.";
} else{
$body_type = trim($_POST['body_type']);
}
//validate appearance
if(empty(trim($_POST['appearance']))){
$appearance_err = "Please enter appearance.";
} else{
$appearance = trim($_POST['appearance']);
}
//validate skin colour
if(empty(trim($_POST['skin_colour']))){
$skin_colour_err = "Please enter skin colour.";
} else{
$skin_colour = trim($_POST['skin_colour']);
}
//validate ethnicity
if(empty(trim($_POST['ethnicity']))){
$ethnicity_err = "Please enter ethnicity.";
} else{
$ethnicity = trim($_POST['ethnicity']);
}
//validate caste
if(empty(trim($_POST['caste']))){
$caste_err = "Please enter email.";
} else{
$caste = trim($_POST['caste']);
}
//validate religion
if(empty(trim($_POST['religion']))){
$religion_err = "Please enter religion.";
} else{
$religion = trim($_POST['religion']);
}
//validate education
if(empty(trim($_POST['education']))){
$eeducation_err = "Please enter education.";
} else{
$education = trim($_POST['education']);
}
//validate career sector
if(empty(trim($_POST['career_sector']))){
$career_sector_err = "Please enter career sector.";
} else{
$career_sector = trim($_POST['career_sector']);
}
//validate mother language
if(empty(trim($_POST['mother_language']))){
$mother_language_err = "Please enter mother language.";
} else{
$mother_language = trim($_POST['mother_language']);
}
//validate occupation
if(empty(trim($_POST['occupation']))){
$occupation_err = "Please enter occupation.";
} else{
$occupation = trim($_POST['occupation']);
}
//validate social class
if(empty(trim($_POST['social_class']))){
$social_class_err = "Please enter social class.";
} else{
$social_class = trim($_POST['social_class']);
}
//validate drinking
if(empty(trim($_POST['drinking']))){
$drinking_err = "Please enter drinking.";
} else{
$drinking = trim($_POST['drinking']);
}
//validate alcohol
if(empty(trim($_POST['alcohol']))){
$alcohol_err = "Please enter alcohol.";
} else{
$alcohol = trim($_POST['alcohol']);
}
//validate smoking
if(empty(trim($_POST['smoking']))){
$smoking_err = "Please enter smoking.";
} else{
$smoking = trim($_POST['smoking']);
}
//validate diet
if(empty(trim($_POST['diet']))){
$diet_err = "Please enter diet.";
} else{
$diet = trim($_POST['diet']);
}
//validate family values
if(empty(trim($_POST['family_values']))){
$family_values_err = "Please enter famili values.";
} else{
$family_values = trim($_POST['family_values']);
}
//validate personality
if(empty(trim($_POST['personality']))){
$personality_err = "Please enter personality.";
} else{
$personality = trim($_POST['personality']);
}
//validate hobbies
if(empty(trim($_POST['hobbies']))){
$hobbies_err = "Please enter hobbies.";
} else{
$hobbies = trim($_POST['hobbies']);
}
//validate profile posted by
if(empty(trim($_POST['profile_posted_by']))){
$profile_posted_by_err = "Please enter profile posted by.";
} else{
$profile_posted_by = trim($_POST['profile_posted_by']);
}
//validate about me
if(empty(trim($_POST['about_me']))){
$about_me_err = "Please enter about me.";
} else{
$about_me = trim($_POST['about_me']);
}
// Validate username
if(empty(trim($_POST["username"]))){
$username_err = "Please enter a username.";
} else{
// Prepare a select statement
$sql = "SELECT user_id FROM users WHERE username = ?";
if($stmt = mysqli_prepare($link, $sql)){
// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $param_username);
// Set parameters
$param_username = trim($_POST["username"]);
// Attempt to execute the prepared statement
if(mysqli_stmt_execute($stmt)){
/* store result */
mysqli_stmt_store_result($stmt);
if(mysqli_stmt_num_rows($stmt) == 1){
$username_err = "This username is already taken.";
} else{
$username = trim($_POST["username"]);
}
} else{
echo "Oops! Something went wrong. Please try again later.";
}
}
// Close statement
mysqli_stmt_close($stmt);
}
// Validate password
if(empty(trim($_POST['password']))){
$password_err = "Please enter a password.";
} elseif(strlen(trim($_POST['password'])) < 6){
$password_err = "Password must have atleast 6 characters.";
} else{
$password = trim($_POST['password']);
}
// Validate confirm password
if(empty(trim($_POST["confirm_password"]))){
$confirm_password_err = 'Please confirm password.';
} else{
$confirm_password = trim($_POST['confirm_password']);
if($password != $confirm_password){
$confirm_password_err = 'Password did not match.';
}
}
// Check input errors before inserting in database
if(empty($username_err) && empty($password_err) && empty($confirm_password_err) && empty($first_name_err) && empty($last_name_err) && empty($email_err) && empty($date_of_birth_err) && empty($nic_err) && empty($marital_state_err) && empty($children_err) && empty($residency_err) && empty($height_err) && empty($weight_err) && empty($body_type_err) && empty($appearance_err) && empty($skin_colour_err) && empty($ethnicity_err) && empty($caste_err) && empty($religion_err) && empty($education_err) && empty($career_sector_err) && empty($mother_language_err) && empty($occupation_err) && empty($social_class_err) && empty($drinking_err) && empty($alcohol_err) && empty($smoking_err) && empty($diet_err) && empty($family_Values_err) && empty($personality_err) && empty($hobbies_err) && empty($about_me_err) && empty($profile_posted_by_err)){
// Prepare an insert statement
// $sql = "INSERT INTO users (username, password, first_name, last_name, email, date_of_birth, nic, children, passport, marital_state, residency, height, weight, body_type, appearance, skin_colour, ethnicity, caste, religion, education, career_sector, mother_language, occupation, social_class, drinking, alcohol, smoking, diet, family_values, personality, hobbies, profile_posted_by, about_me) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
if($stmt = mysqli_prepare($link, "INSERT INTO users (username, password, first_name, last_name, email, date_of_birth, nic, children, passport, marital_state, residency, height, weight, body_type, appearance, skin_colour, ethnicity, caste, religion, education, career_sector, mother_language, occupation, social_class, drinking, alcohol, smoking, diet, family_values, personality, hobbies, profile_posted_by, about_me) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")){
// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "sssssssssssssssssssssssssssssssss",$param_username, $param_password, $param_first_name, $param_last_name, $param_email, $param_nic, $param_date_of_birth, $param_passport, $param_marital_state, $param_children, $param_residency, $param_height, $param_weight, $param_body_type, $param_appearance, $param_skin_colour, $param_ethnicity, $param_caste, $param_religion, $param_education, $param_career_sector, $param_mother_language, $param_occupation, $param_social_class, $param_drinking, $param_alcohol, $param_smoking, $param_diet, $param_family_values, $param_personality, $param_hobbies, $param_about_me, $param_profile_posted_by);
// Set parameters
$param_username = $username;
$param_first_name = $first_name;
$param_last_name = $last_name;
$param_email = $email;
$param_password = password_hash($password, PASSWORD_DEFAULT); // Creates a password hash
$param_date_of_birth = $date_of_birth;
$param_nic = $nic;
$param_passport = $passport;
$param_marital_state = $marital_state;
$param_residency = $residency;
$param_height = $height;
$param_weight = $weight;
$param_body_type = $body_type;
$param_appearance = $appearance;
$param_skin_colour = $skin_colour;
$param_ethnicity = $ethnicity;
$param_caste = $caste;
$param_religion = $religion;
$param_education = $education;
$param_career_sector = $career_sector;
$param_mother_language = $mother_language;
$param_occupation = $occupation;
$param_social_class = $social_class;
$param_drinking = $drinking;
$param_alcohol = $alcohol;
$param_smoking = $smoking;
$param_diet = $diet;
$param_family_values = $family_values;
$param_personality = $personality;
$param_hobbies = $hobbies;
$param_about_me = $about_me;
$param_children = $children;
$param_profile_posted_by = $profile_posted_by;
// Attempt to execute the prepared statement
if(mysqli_stmt_execute($stmt)){
// Redirect to login page
header("location: login.php");
} else{
echo "Something went wrong. Please try again later.";
}
}
// Close statement
mysqli_stmt_close($stmt);
}
// Close connection
mysqli_close($link);
}
?>
code eka kiyawanna giyama epa wenawa $smt false or null wenna athi
<?php
// Include config file
require_once 'config.php';
// Define variables and initialize with empty values
$username = $password = $confirm_password = $first_name = $last_name = $email = $date_of_birth = $nic = $passport = $marital_state = $children = $residency = $height = $weight = $body_type = $appearance = $skin_colour = $ethnicity = $caste = $religion = $education = $career_sector = $mother_language = $occupation = $social_class = $drinking = $alcohol = $smoking = $diet = $family_values = $personality = $hobbies = $profile_posted_by = $about_me = "";
$username_err = $password_err = $confirm_password_err = $first_name_err = $last_name_err = $email_err = $date_of_birth_err = $nic_err = $passport_err = $marital_state_err = $children_err = $residency_err = $height_err = $weight_err = $body_type_err = $appearance_err = $skin_colour_err = $ethnicity_err = $caste_err = $religion_err = $education_err = $career_sector_err = $mother_language_err = $occupation_err = $social_class_err = $drinking_err = $alcohol_err = $smoking_err = $diet_err = $family_values_err = $personality_err = $hobbies_err = $profile_posted_by_err = $about_me_err = "";
// Processing form data when form is submitted
if($_SERVER["REQUEST_METHOD"] == "POST"){
//validate firstname
if(empty(trim($_POST['first_name']))){
$first_name_err = "Please enter first name.";
} else{
$first_name = trim($_POST['first_name']);
}
//validate lastname
if(empty(trim($_POST['last_name']))){
$last_name_err = "Please enter last name.";
} else{
$last_name = trim($_POST['last_name']);
}
//validate email
if(empty(trim($_POST['email']))){
$email_err = "Please enter email.";
} else{
$email = trim($_POST['email']);
}
//validate date of birth
if(empty(trim($_POST['date_of_birth']))){
$date_of_birth_err = "Please enter date of birth.";
} else{
$date_of_birth = trim($_POST['date_of_birth']);
}
//validate nic
if(empty(trim($_POST['nic']))){
$nic_err = "Please enter NIC.";
} else{
$nic = trim($_POST['nic']);
}
//validate passport
if(empty(trim($_POST['passport']))){
$passport_err = "Please enter passport.";
} else{
$passport = trim($_POST['passport']);
}
//validate marital state
if(empty(trim($_POST['marital_state']))){
$marital_state_err = "Please enter marital state.";
} else{
$marital_state = trim($_POST['marital_state']);
}
//validate children
if(empty(trim($_POST['children']))){
$children_err = "Please enter children.";
} else{
$children = trim($_POST['children']);
}
//validate residency
if(empty(trim($_POST['residency']))){
$residency_err = "Please enter residency.";
} else{
$residency = trim($_POST['residency']);
}
//validate height
if(empty(trim($_POST['height']))){
$height_err = "Please enter height.";
} else{
$height = trim($_POST['height']);
}
//validate weight
if(empty(trim($_POST['weight']))){
$weight_err = "Please enter weight.";
} else{
$weight = trim($_POST['weight']);
}
//validate body type
if(empty(trim($_POST['body_type']))){
$body_type_err = "Please enter body type.";
} else{
$body_type = trim($_POST['body_type']);
}
//validate appearance
if(empty(trim($_POST['appearance']))){
$appearance_err = "Please enter appearance.";
} else{
$appearance = trim($_POST['appearance']);
}
//validate skin colour
if(empty(trim($_POST['skin_colour']))){
$skin_colour_err = "Please enter skin colour.";
} else{
$skin_colour = trim($_POST['skin_colour']);
}
//validate ethnicity
if(empty(trim($_POST['ethnicity']))){
$ethnicity_err = "Please enter ethnicity.";
} else{
$ethnicity = trim($_POST['ethnicity']);
}
//validate caste
if(empty(trim($_POST['caste']))){
$caste_err = "Please enter email.";
} else{
$caste = trim($_POST['caste']);
}
//validate religion
if(empty(trim($_POST['religion']))){
$religion_err = "Please enter religion.";
} else{
$religion = trim($_POST['religion']);
}
//validate education
if(empty(trim($_POST['education']))){
$eeducation_err = "Please enter education.";
} else{
$education = trim($_POST['education']);
}
//validate career sector
if(empty(trim($_POST['career_sector']))){
$career_sector_err = "Please enter career sector.";
} else{
$career_sector = trim($_POST['career_sector']);
}
//validate mother language
if(empty(trim($_POST['mother_language']))){
$mother_language_err = "Please enter mother language.";
} else{
$mother_language = trim($_POST['mother_language']);
}
//validate occupation
if(empty(trim($_POST['occupation']))){
$occupation_err = "Please enter occupation.";
} else{
$occupation = trim($_POST['occupation']);
}
//validate social class
if(empty(trim($_POST['social_class']))){
$social_class_err = "Please enter social class.";
} else{
$social_class = trim($_POST['social_class']);
}
//validate drinking
if(empty(trim($_POST['drinking']))){
$drinking_err = "Please enter drinking.";
} else{
$drinking = trim($_POST['drinking']);
}
//validate alcohol
if(empty(trim($_POST['alcohol']))){
$alcohol_err = "Please enter alcohol.";
} else{
$alcohol = trim($_POST['alcohol']);
}
//validate smoking
if(empty(trim($_POST['smoking']))){
$smoking_err = "Please enter smoking.";
} else{
$smoking = trim($_POST['smoking']);
}
//validate diet
if(empty(trim($_POST['diet']))){
$diet_err = "Please enter diet.";
} else{
$diet = trim($_POST['diet']);
}
//validate family values
if(empty(trim($_POST['family_values']))){
$family_values_err = "Please enter famili values.";
} else{
$family_values = trim($_POST['family_values']);
}
//validate personality
if(empty(trim($_POST['personality']))){
$personality_err = "Please enter personality.";
} else{
$personality = trim($_POST['personality']);
}
//validate hobbies
if(empty(trim($_POST['hobbies']))){
$hobbies_err = "Please enter hobbies.";
} else{
$hobbies = trim($_POST['hobbies']);
}
//validate profile posted by
if(empty(trim($_POST['profile_posted_by']))){
$profile_posted_by_err = "Please enter profile posted by.";
} else{
$profile_posted_by = trim($_POST['profile_posted_by']);
}
//validate about me
if(empty(trim($_POST['about_me']))){
$about_me_err = "Please enter about me.";
} else{
$about_me = trim($_POST['about_me']);
}
// Validate username
if(empty(trim($_POST["username"]))){
$username_err = "Please enter a username.";
} else{
// Prepare a select statement
$sql = "SELECT user_id FROM users WHERE username = ?";
if($stmt = mysqli_prepare($link, $sql)){
// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "s", $param_username);
// Set parameters
$param_username = trim($_POST["username"]);
// Attempt to execute the prepared statement
if(mysqli_stmt_execute($stmt)){
/* store result */
mysqli_stmt_store_result($stmt);
if(mysqli_stmt_num_rows($stmt) == 1){
$username_err = "This username is already taken.";
} else{
$username = trim($_POST["username"]);
}
} else{
echo "Oops! Something went wrong. Please try again later.";
}
}
// Close statement
mysqli_stmt_close($stmt);
}
// Validate password
if(empty(trim($_POST['password']))){
$password_err = "Please enter a password.";
} elseif(strlen(trim($_POST['password'])) < 6){
$password_err = "Password must have atleast 6 characters.";
} else{
$password = trim($_POST['password']);
}
// Validate confirm password
if(empty(trim($_POST["confirm_password"]))){
$confirm_password_err = 'Please confirm password.';
} else{
$confirm_password = trim($_POST['confirm_password']);
if($password != $confirm_password){
$confirm_password_err = 'Password did not match.';
}
}
// Check input errors before inserting in database
if(empty($username_err) && empty($password_err) && empty($confirm_password_err) && empty($first_name_err) && empty($last_name_err) && empty($email_err) && empty($date_of_birth_err) && empty($nic_err) && empty($marital_state_err) && empty($children_err) && empty($residency_err) && empty($height_err) && empty($weight_err) && empty($body_type_err) && empty($appearance_err) && empty($skin_colour_err) && empty($ethnicity_err) && empty($caste_err) && empty($religion_err) && empty($education_err) && empty($career_sector_err) && empty($mother_language_err) && empty($occupation_err) && empty($social_class_err) && empty($drinking_err) && empty($alcohol_err) && empty($smoking_err) && empty($diet_err) && empty($family_Values_err) && empty($personality_err) && empty($hobbies_err) && empty($about_me_err) && empty($profile_posted_by_err)){
// Prepare an insert statement
// $sql = "INSERT INTO users (username, password, first_name, last_name, email, date_of_birth, nic, children, passport, marital_state, residency, height, weight, body_type, appearance, skin_colour, ethnicity, caste, religion, education, career_sector, mother_language, occupation, social_class, drinking, alcohol, smoking, diet, family_values, personality, hobbies, profile_posted_by, about_me) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
if($stmt = mysqli_prepare($link, "INSERT INTO users (username, password, first_name, last_name, email, date_of_birth, nic, children, passport, marital_state, residency, height, weight, body_type, appearance, skin_colour, ethnicity, caste, religion, education, career_sector, mother_language, occupation, social_class, drinking, alcohol, smoking, diet, family_values, personality, hobbies, profile_posted_by, about_me) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")){
// Bind variables to the prepared statement as parameters
mysqli_stmt_bind_param($stmt, "sssssssssssssssssssssssssssssssss",$param_username, $param_password, $param_first_name, $param_last_name, $param_email, $param_nic, $param_date_of_birth, $param_passport, $param_marital_state, $param_children, $param_residency, $param_height, $param_weight, $param_body_type, $param_appearance, $param_skin_colour, $param_ethnicity, $param_caste, $param_religion, $param_education, $param_career_sector, $param_mother_language, $param_occupation, $param_social_class, $param_drinking, $param_alcohol, $param_smoking, $param_diet, $param_family_values, $param_personality, $param_hobbies, $param_about_me, $param_profile_posted_by);
// Set parameters
$param_username = $username;
$param_first_name = $first_name;
$param_last_name = $last_name;
$param_email = $email;
$param_password = password_hash($password, PASSWORD_DEFAULT); // Creates a password hash
$param_date_of_birth = $date_of_birth;
$param_nic = $nic;
$param_passport = $passport;
$param_marital_state = $marital_state;
$param_residency = $residency;
$param_height = $height;
$param_weight = $weight;
$param_body_type = $body_type;
$param_appearance = $appearance;
$param_skin_colour = $skin_colour;
$param_ethnicity = $ethnicity;
$param_caste = $caste;
$param_religion = $religion;
$param_education = $education;
$param_career_sector = $career_sector;
$param_mother_language = $mother_language;
$param_occupation = $occupation;
$param_social_class = $social_class;
$param_drinking = $drinking;
$param_alcohol = $alcohol;
$param_smoking = $smoking;
$param_diet = $diet;
$param_family_values = $family_values;
$param_personality = $personality;
$param_hobbies = $hobbies;
$param_about_me = $about_me;
$param_children = $children;
$param_profile_posted_by = $profile_posted_by;
// Attempt to execute the prepared statement
if(mysqli_stmt_execute($stmt)){
// Redirect to login page
header("location: login.php");
} else{
echo "Something went wrong. Please try again later.";
}
}
// Close statement
mysqli_stmt_close($stmt);
}
// Close connection
mysqli_close($link);
}
?>
code eka kiyawanna giyama epa wenawa $smt false or null wenna athi
Eka eka add kara kara balapan

var_dump(mysqli_error($link));
mysqli_stmt_execute($stmt);
if (mysqli_affected_rows($link))
{
mysqli_stmt_close($stmt);
}
parameters 33? // Attempt to execute the prepared statement
if (mysqli_stmt_execute($stmt)) {
// Redirect to login page
header("location: login.php");
} else {
echo "Something went wrong. Please try again later.";
}
//add here
mysqli_stmt_close($stmt);
}
//add here
mysqli_close($link);
// Close statement
// mysqli_stmt_close($stmt); //removed
}
// Close connection
//mysqli_close($link);//removed
?>
if ($stmt = mysqli_prepare($link, "INSERT INTO users (
if (mysqli_stmt_execute($stmt)) {
/* store result */
//echo 'e';
mysqli_stmt_store_result($stmt);
if (mysqli_stmt_num_rows($stmt) == 1) {
$username_err = "This username is already taken.";
} else {
$username = trim($_GET["username"]);
echo $username . '---';
}
} else {
echo "Oops! Something went wrong. Please try again later.";
}
//add here
mysqli_stmt_close($stmt);
}
//removed
//mysqli_stmt_close($stmt);
// Close statement
1.PDO use karapan mysqli use karanne na dan.
2. Wait for answer...
Updated:
මේක දාලා හරියටම error එක බලපන්PHP:var_dump(mysqli_error($link));
try this:
PHP:mysqli_stmt_execute($stmt); if (mysqli_affected_rows($link)) { mysqli_stmt_close($stmt); }
check this link : https://stackoverflow.com/a/49082770/9512787
අනික පොඩ්ඩක් බලපන් උඹේ ඩේටාබේස් එකේ date_of_birth එකට දීලා තියෙන ඩේටා ටයිප් එක...ඔය සේර්ම String දparameters 33?
use a framework.