Comments (8)
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.
from php-signup-login.
I do have auto increment on though. However i dont see anything in the code that inserts anything into the id
from php-signup-login.
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.
from php-signup-login.
Alright. I fixed the signup, however the login is not working now.
from php-signup-login.
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 Account
Let's get started with your account
<div class="card reg-form pt-3 pb-3">
<div class="card-body">
<em>Invalid login</em>
<?php endif; ?>
<form method="post">
<p class="mb-2 pt-1 label-fr">Username</p>
<div class="input-group mb-3 input-group-custom">
<span class="input-group-text input-group-custom-field">
<i class="far fa-user"></i>
</span>
<input type="text" class="form-control input-group-custom-field" placeholder="Username" name="email" id="email" value="<?= htmlspecialchars($_POST["email"] ?? "") ?>">
</div>
<p class="mb-2 pt-1 label-fr">Password</p>
<div class="input-group mb-3 input-group-custom">
<span class="input-group-text input-group-custom-field">
<i class="fa fa-lock"></i>
</span>
<input type="password" class="form-control input-group-custom-field" placeholder="XXXXXXX" name="password" id="password">
</div>
<div class="form-group pt-1">
<label>
<input type="checkbox" required>
<span class="rem"> Remember Me </span>
</label>
</div>
<div class="form-group text-center mb-4 mt-3">
<button type="button" class="btn btn1 ps-4 pe-4 pt-2 pb-2"> SIGN IN </button>
</div>
<div class="d-lg-flex justify-content-between links text-center f15">
<p class="mb-md-0 mb-1">
Don't have an account? <a href="signup.html" class="gray text-links">Sign Up</a>
</p>
<p class="mb-md-0 mb-1">
Forgot Password? <a href="forgot-password.html" class="gray text-links">Reset it</a>
</p>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
Subscribe to Our Newsletter
Stay updated with the latest news and promotions.
SubscribeCherryBerry Studios
<p class="pe-xl-5">
Duis posuere accumsan neque eu tristique. Sed at enim ultrices, cursus ipsum id, mattis massa.
</p>
</div>
<div class="col-md-6 col-lg-2 pt-4">
<h5 class="pb-2">
Quick Links
</h5>
<ul class="list-inline list1">
<li>
<a href="index.html">
Home
</a>
</li>
<li>
<a href="about.html">
About Us
</a>
</li>
<li>
<a href="">
Sign Up
</a>
</li>
</ul>
</div>
<div class="col-md-6 col-lg-2 pt-4">
<h5 class="pb-2">
Quick Links
</h5>
<ul class="list-inline list1">
<li>
<a href="index.html">
Home
</a>
</li>
<li>
<a href="about.html">
About Us
</a>
</li>
<li>
<a href="">
Sign Up
</a>
</li>
</ul>
</div>
<div class="col-md-6 col-lg-4 pt-4">
<h5 class="pb-2">
Contact Us
</h5>
<ul class="list-inline list1">
<li>
<a href="mailto:[email protected]">
<i class="far fa-envelope"></i>
[email protected]
</a>
</li>
</ul>
<ul class="list-inline social-list2">
<li class="list-inline-item">
<a href="">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li class="list-inline-item">
<a href="">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="list-inline-item">
<a href="">
<i class="fab fa-youtube"></i>
</a>
</li>
<li class="list-inline-item">
<a href="">
<i class="fab fa-instagram"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
©2023 - CherryBerry Studios - All rights reserved.
<div id="disclaimer" class="dis-popup">
<p class="dis-text">This website uses cookies and collects diagnostic data to improve your browsing experience. By continuing to use this site, you consent to the use of cookies and data collection. For more details, please refer to our <a class="gray text-links" href="privacy.html">Privacy Policy</a>.</p>
<button class="btn btn1 dis-btn" id="acceptButton">Accept & Continue</button>
</div>
from php-signup-login.
Uhm. I dont think it was supposed to display the actual elements
from php-signup-login.
I will just upload the file. #
signin.php.txt
from php-signup-login.
Please can you describe exactly what the problem is? Do you get any error messages?
from php-signup-login.
Related Issues (12)
- Not able to display the message "email already exist" HOT 5
- Signup Parse Error HOT 2
- Prevention of Duplicate Emails Not Working Properly HOT 4
- Signup doesnt work HOT 2
- login form doesn't recognise password array key HOT 2
- JustValidate doesn't work HOT 4
- Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' HOT 3
- issue with password validation HOT 4
- Issues with process-signup file, database connection HOT 2
- Validation from validation.js isn't working. HOT 1
- Email Already Taken HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-signup-login.