-
Notifications
You must be signed in to change notification settings - Fork 81
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
Signup is not working properly. #14
Comments
It looks like you don't have AUTO_INCREMENT set on your id column in the database - this assigns IDs automatically when you insert a new record. |
I do have auto increment on though. However i dont see anything in the code that inserts anything into the id |
Then you don't need to include the id in the list of fields in the insert statement, or in the list of values. New records will be assigned a new value automatically. |
Alright. I fixed the signup, however the login is not working now. |
Here is the code for the signin page: real_escape_string($_POST["email"])); $result = $mysqli->query($sql); $user = $result->fetch_assoc(); if ($user) { if (password_verify($_POST["password"], $user["password_hash"])) { session_start(); session_regenerate_id(); $_SESSION["user_id"] = $user["id"]; header("Location: index.php"); exit; } } $is_invalid = true; } ?><!doctype html> <title>Sign In</title> <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>![]()
Sign In To Your AccountLet's get started with your account
Subscribe to Our NewsletterStay updated with the latest news and promotions. SubscribeCherryBerry Studios
©2023 - CherryBerry Studios - All rights reserved.
|
Uhm. I dont think it was supposed to display the actual elements |
I will just upload the file. # |
Please can you describe exactly what the problem is? Do you get any error messages? |
Hello. When i try to register, i am greeted with this message: Field 'id' doesn't have a default value 1364
I dont know what this means but all i know is its preventing the details to go into the database.
Any help would be greatly appreciated.
Thanks in advance!
The text was updated successfully, but these errors were encountered: