Giter Club home page Giter Club logo

php-signup-login's People

Contributors

daveh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

php-signup-login's Issues

Error message location

Hello, where I need edit error messages location? Because I delete the water.css and I want create my one, but the problem is the when I edit the name input location the error message still remain in the old position. Thanks:)
image

How to make same as email but now with name "already taken"

Hello I want to ask how to make same as email but now with name "already taken" I tried but didn't work.

<?php

$mysqli = require __DIR__ . "/database.php";

// Check if $_GET["name"] is set and not empty
$name = isset($_GET["name"]) ? trim($_GET["name"]) : "";

// Check if email is not empty after trimming
if (!empty($name)) {
    $escaped_name = $mysqli->real_escape_string($name);

    $sql = "SELECT * FROM user WHERE name = '$escaped_name'";
    
    $result = $mysqli->query($sql);

    if ($result !== false) {
        $is_available = $result->num_rows === 0;
        echo json_encode(["available" => $is_available]);
    } else {
        die("Error: " . $mysqli->error);
    }
} else {
    echo json_encode(["error" => "Invalid or empty email parameter"]);
}
?>

I tried like this but didn't work

Thank you!

Email Already Taken

Constantly receiving the error "email already taken" even though the database is empty. connection works, all fields are labeled correctly.... let me know if any further info is needed.

Signup is not working properly.

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!

Signup doesnt work

First i tryed to make the code work on my test website, didnt work. Then I copied the exact code you provided without anything else. once i click submit I only get this displayed :

stmt_init(); if ( ! $stmt->prepare($sql)) { die("SQL error: " . $mysqli->error); } $stmt->bind_param("sss", $_POST["name"], $_POST["email"], $password_hash); if ($stmt->execute()) { header("Location: signup-success.html"); exit; } else { if ($mysqli->errno === 1062) { die("email already taken"); } else { die($mysqli->error . " " . $mysqli->errno); } } ?>

Issues with process-signup file, database connection

Hello, I was following your tutorial up to the point where the ability to insert a new record is created. However, I've been unable to have the form submit information from the inputs; submitting the form only results in the generic HTTP ERROR 500. The only further details I can find (through the Google Chrome console) is "No resource with given URL found", and "crbug/1173575, non-JS module files deprecated".

Validation from validation.js isn't working.

Like what the title said, the validation.js isn't working. It's not showing the "red error" text on the sign-up page. Did I do something wrong? Tested it on both edge and chrome.

Signup Parse Error

I am getting an error after submitting the Signup form (Signup.html):

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\database.php on line 17

Database.php contents:

connect_errno) { die("Connection error: " . $mysqli->connect_error); } return $mysqli;

issue with password validation

on signup page
the password validation is not working - browser debugger throws following error

Uncaught TypeError: Cannot read properties of undefined (reading 'em')
at Object.validator (validation.js:40:54)
at Object.validateFieldRule (just-validate.production.min.js:1:13737)
at just-validate.production.min.js:1:14463
at Array.forEach ()
at Object.validateField (just-validate.production.min.js:1:14437)
at Object.handleFieldChange (just-validate.production.min.js:1:4444)
at HTMLInputElement. (just-validate.production.min.js:1:4713)

login form doesn't recognise password array key

Hi Dave I've gotten stuck and I don't know how to overcome this after trying for some time now.
The form is sending data to my user table with the signup being successful the issue is the login form doesn't work due to the password array key not being identified.

Warning: Undefined array key "password" in C:\xampp\htdocs\login-form\login.php on line 17
16 if ($user) {
17 if (password_verify($_POST["password"], $user["password_hash"])) {
18 die("Login Successful");
19 }
20 }

the repository is below.
https://github.com/Tashfinz/signup

Prevention of Duplicate Emails Not Working Properly

Hello,

Everything works fine except for the prevention of duplicate emails. It appears that there is an error in the process-signup.php. The code was copied directly from the source provided. Perhaps, I inadvertently added or omitted a character.

ERROR RECEIVED when a duplicate email was added for a new user:

Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' in C:\xampp\htdocs\php-signup-login-main\process-signup.php:45 Stack trace: #0 C:\xampp\htdocs\php-signup-login-main\process-signup.php(45): mysqli_stmt->execute() #1 {main} thrown in C:\xampp\htdocs\php-signup-login-main\process-signup.php on line 45

This is the code for http://localhost/php-signup-login-main/process-signup.php:

stmt_init(); if ( ! $stmt->prepare($sql)) { die("SQL error: " . $mysqli->error); } $stmt->bind_param("sss", $_POST["name"], $_POST["email"], $password_hash); if ($stmt->execute()) { header("Location: signup-success.html"); exit; } else { if ($mysqli->errno === 1062) { die("email already taken"); } else { die($mysqli->error . " " . $mysqli->errno); } }

Not able to display the message "email already exist"

signup-process.php : an error occurred in mentioned file,
why these lines of codes doesn't work
}else {
if ($mysqli->errno === 1062) {
die("email already taken");
} else {
die($mysqli->error." ".$mysqli->errno);
}
}

Undefined array key "email"

I get this error message: Undefined array key "email"
Screenshot 2024-03-13 160452

I don't get it because i am following your video step by step.

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.