Giter Club home page Giter Club logo

Comments (8)

daveh avatar daveh commented on August 15, 2024

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.

LilPhyziX avatar LilPhyziX commented on August 15, 2024

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.

daveh avatar daveh commented on August 15, 2024

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.

LilPhyziX avatar LilPhyziX commented on August 15, 2024

Alright. I fixed the signup, however the login is not working now.

from php-signup-login.

LilPhyziX avatar LilPhyziX commented on August 15, 2024

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>
img CherryBerry Studios
                  <li class="nav-item">
                    <a class="nav-link" href="index.php">Home</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="about.html">About Us</a>
                  </li>
    
    
                  <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" role="button" aria-expanded="false">
                      Story
                    </a>
                    <ul class="dropdown-menu">
                      <li><a class="dropdown-item" href="mission.html">Mission</a></li>
                      <li>
                        <hr class="dropdown-divider">
                      </li>
                      <li><a class="dropdown-item" href="vision.html">Vision</a></li>
                      <li>
                        <hr class="dropdown-divider">
                      </li>
                      <li><a class="dropdown-item" href="objective.html">Objective</a></li>
                    </ul>
                  </li>
    
    
                  <li class="nav-item">
                    <a class="nav-link" href="community.html">Community</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="support.html">Support</a>
                  </li>
    
                </ul>
                <form class="d-flex ms-lg-5">
    
                  <a href="signup.html" class="btn btn-menu">Sign Up</a>
                </form>
              </div>
            </div>
          </nav>
        </div>
      </div>
    </div>
    

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.

Subscribe
CherryBerry 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>
Logo

Please Wait...

<script src="assets/js/core.js"></script>

from php-signup-login.

LilPhyziX avatar LilPhyziX commented on August 15, 2024

Uhm. I dont think it was supposed to display the actual elements

from php-signup-login.

LilPhyziX avatar LilPhyziX commented on August 15, 2024

I will just upload the file. #
signin.php.txt

from php-signup-login.

daveh avatar daveh commented on August 15, 2024

Please can you describe exactly what the problem is? Do you get any error messages?

from php-signup-login.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.