-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' #5
Comments
Th0ngpv
changed the title
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry 'name' for key 'name'
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email'
Nov 3, 2022
If you have a unique index on the email column, you'll get this error if you try and insert a new value - what code do you have for catching the duplicate index error? |
Try this. Instead of for example
Change the structure into something like
Hope it helps. |
add this line of code before check for email mysqli_report(MYSQLI_REPORT_OFF); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' in C:\xampp\htdocs\php-signup-login\process-signup.php:45 Stack trace: #0 C:\xampp\htdocs\php-signup-login\process-signup.php(45): mysqli_stmt->execute() #1 {main} thrown in C:\xampp\htdocs\php-signup-login\process-signup.php on line 45
I keep getting this error and don't know what to do .
The text was updated successfully, but these errors were encountered: