Comments

drocksofangelo

Thu 14 Feb, 2019 11:45 pm

// Use an if statement to check for detailed error messages.

assuming you already have a $con variable for your connection


if (!mysqli_query($con, "INSERT INTO registered_customer (email) VALUES ('hello')"))
  {
  echo("Error description: " . mysqli_error($con));
  }

Rayyspark

Fri 15 Feb, 2019 08:52 am

kindly check the email field data type, if unique from the table and ensure it supports strings of that length and do double check your db connection and possibly the table name too...

drocksofangelo

Fri 15 Feb, 2019 02:26 pm

@mrcodes. It doesn't work because you are copying my codes verbatim??? Where is your connection variable? Then if no error gets displayed; then it worked; unless of course once again you are not calling the connection properly. Do well to paste the source code that has this issue if possible from top to bottom, so we can replicate it.