44: (UPDATED VIDEO IN DESC) How To Create A Login System In PHP For Beginners | PHP Tutorial
Why Stack Overflow recommends it
Stack Overflow users link it as the tutorial they followed to build a PHP login and signup system, and ask questions when their own code based on it misbehaves.
Recommended by 1 people across 1 different months, 2019 to 2022.
What it is
A beginner PHP tutorial from Dani Krossing, running nearly two hours, that builds a signup and login system from scratch with MySQLi, prepared statements, error handlers, and session-based content for logged-in users. The description points to an updated video and warns about a bug when several accounts share one e-mail.
What people said
Recommends user12627284 · 2020-01 · Stack Overflow · on “How can I display the login/logoutbutton(); in the html title?”
You do not even need a new site, because you can handle to show html for logged in and html for logged out user on one site. Here is a way to do that: You need a session_start at the beginning of the page. <?php session_start(); ?> Use this to show the logout button when you are logged in and to show the login button when you are logged out. You have to place it at the position where to button is located and replace LOGOUT BUTTON and LOGIN BUTTON with your HTML of the buttons. <?php if (isset($_SESSION['steamid'])) { echo ' LOUGOUT BUTTON HTML'; }else{ echo ' LOGIN BUTTON HTML'; ?> Here is a perfect tutorial for all your needs: [this video]
Cites Limpuls · 2019-03 · Stack Overflow · on “What is the purpose of putting error message in URL [PHP]?”
i was watching this tutorial [this video] and at 42:15 the guy is putting PHP error in URL. But what is the purpose of it, if users don't look at urls and it's not user friendly, he should have displayed it in design. Now i don't really see any use of this, unless i'm misunderstanding something. Thanks.
Cites Pedro Cantante · 2019-05 · Stack Overflow · on “PHP login for website giving "wrong password" error with correct password”
Shoutout to the YouTube user "mmtuts" because this is basically a copy from his tutorial (at least I learned something) ( [this video] ). This is my first attempt for a website with a login system. TL;DR: I ran into the problem where not even the correct passwords work with any user (aparently the user is accepted since I had the error "wronguser" aka user not found in the database but then I found my mistakes). I am running my database using MySQL and Apache (using XAMPP). I've tried to rewrite all the names on the database and the main PHP index where the website is with the login inputs on a modal. mysqli_stmt_bind_param($stmt, "ss", $mailuid, $mailuid); mysqli_stmt_execute($stmt); $result = m
Cites SplatM4n · 2020-06 · Stack Overflow · on “Sign up process in php being successfully completed when new user doesn't show up in phpmyadmin database”
I was following the most popular php tutorial on YouTube on how to create a sign up and log in process using PHP: [this video] I got some issues at first but they were just syntax errors and was able to fix them. When I put in the username, email, password, and retyped password, and clicked sign up, it gave the message that it was successful. The problem was however, when I wen't back to the phpmyadmin database, the new row for the user didn't show up on the table. Now I am thinking this has something to do with phpmyadmin or sql and not the code itself. So the specifics are: Hosting program: XAMPP Services turned on: ProFTPD, Apache, MySQL OS: MacOS Here are is all the code that I have created b
Cites KingOfTheNorth · 2020-08 · Stack Overflow · on “One form writes to db other does not”
I got two forms that are similar, both write to the same db, but different tables. using the same type of fields, varchar. when i post data on both forms i get a successful message, suppose to only appear once data is written to DB successfully. used the following tutorial to create my first form: " [this video] ". trying to create a register and login system based on it, but data not writing to db. one form (one from video) is writing data to the DB the other is not. not sure what would be the cause. Would anyone know what could be the issue? Form that works and writes to DB: <form action="includes/signup.inc.php" method="post"> <input type="text" name="uid" placeholder="Username"> <input type="
Cites gwei · 2022-01 · Stack Overflow · on “Php login redirect with mysqli”
Hello guys I'm making a signup/login site as a learning and practicing project, I am using a tutorial which : [this video] everything works fine for now and I'm not getting any syntax error but when I logged in with a username/email and password it have to redirect me to ../index.php?login=success page but it doesnt and it stays on index.php page.I can't find if you can help me about it I will be happy to hear from you guys. <?php if (isset($_POST['login-submit'])) { require 'dbh.inc.php'; $mailuid = $_POST['mailuid']; $password = $_POST['pwd']; if (empty($mailuid) || empty($password)) { header("Location: ../index.php?error=emptyfields"); exit(); } else { $sql ="SELECT * FROM users WHERE uidUsers