Let's see if this will work. I have now download, istalled, and testing the code three times. None of these provide the results that you show in your video.
Index.php
Let's try Login first.
I enter emal and password and then am presented with the following screen.
This provides NO direction as to what is wrong or what to do next. I could stay in this 'loop' forever without knowing that the email does not exist and that I need to signup!
Now let's go to the signup page.
Now let's go to the signup page.
I will not just select the Signup button.
So that is not real helpful if I am attempting to signup. I will now enter a name and then use the signup button, but to get there I need to use the back arrow or enter signup.html again. Using the back arrow I return to the normal Signup screen and enter my name,
It goes like this for all potential errors that I test for. My comment that has yet to come through on any reply is that it appears that the javascript error checking is not working or even being called. I will now enter valid information and create a record in the database.
The graphic is probably to small but it is a fatal error on line 45 of process-sign-up.php.
--------------------------------------------
--------------------------------------------
I will stop here but will include the total message that i have been attempting to reply with.
=====
I have several scenarios here.
1. Begin with Index.php - Home Page
Enter nonregister email and password
Returns with invalid login and retains the email address
Button says Log in
Select Log in without a password
Returns as above - same error message, not any message to sign up.
Return to Index and Enter email and invalid password
Acts just as above.
=====================
2. Start with Index.php - Home Page
Select Signup
Displays signup screen with the four fields displayed.
Just select the Signup button
Returns a blank screen with 'Name is required' in the upper left corner.
No other information provided.
Back to Signup and enter Name then select signup
Returns blank screen with 'Valid email is required' in upper left corner
No other information provided.
Back to Signup and enter Name and invalid e-mail address
Same screen as previous attempt
Back to sign up and enter Name and valid e-mail
Returns blank screen with 'Password must be at least 8 characters'
Back to signup and enter 8 character numeric-only password
Blank screen with 'Password must contain at least one letter'
Back to signup and enter 8 character alpha-only password
Same as before with 'Password must contain at least one number'
Back to signup and enter a good password
Blank Screen with 'Passwords must match'
Back to signup and enter the same valid password
Signup Screen displayed with
'Signup successful. You can now log in'
Select Log in
Displays the original Login Screen
Enter known email and password just created.
Displays the Home Screen as it should.
3. Start at Signup
Enter the just created entry and get the following error.
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' in C:\xampp\htdocs\php-signup-login\process-signup.php:45 Stack trace: #0 C:\xampp\htdocs\php-signup-login\process-signup.php(45): mysqli_stmt->execute() #1 {main} thrown in C:\xampp\htdocs\php-signup-login\process-signup.php on line 45
I am unsure what the message should be but certainly not a fatal error.
Here is a part of the code from process-signup.php
=======================
$stmt->bind_param("sss",
$_POST["name"],
$_POST["email"],
$password_hash);
if ($stmt->execute()) {
header("Location: signup-success.html");
exit;
=======================
Line 45 is 'if ($stmt->execute()) {'
Start with Login Screen and log in with valid info and goes to the Index.php Home page.
I never see the Javascript error messages within the various fields on the screen as shown near the end of your tutorial where the JS routine is created in the JS subdirectory.
I am happy to provide whatever else that might help.
Thank you for your help!
Dan
--------------------------------------------
--------------------------------------------
I will stop here but will include the total message that i have been attempting to reply with.
=====
I have several scenarios here.
1. Begin with Index.php - Home Page
Enter nonregister email and password
Returns with invalid login and retains the email address
Button says Log in
Select Log in without a password
Returns as above - same error message, not any message to sign up.
Return to Index and Enter email and invalid password
Acts just as above.
=====================
2. Start with Index.php - Home Page
Select Signup
Displays signup screen with the four fields displayed.
Just select the Signup button
Returns a blank screen with 'Name is required' in the upper left corner.
No other information provided.
Back to Signup and enter Name then select signup
Returns blank screen with 'Valid email is required' in upper left corner
No other information provided.
Back to Signup and enter Name and invalid e-mail address
Same screen as previous attempt
Back to sign up and enter Name and valid e-mail
Returns blank screen with 'Password must be at least 8 characters'
Back to signup and enter 8 character numeric-only password
Blank screen with 'Password must contain at least one letter'
Back to signup and enter 8 character alpha-only password
Same as before with 'Password must contain at least one number'
Back to signup and enter a good password
Blank Screen with 'Passwords must match'
Back to signup and enter the same valid password
Signup Screen displayed with
'Signup successful. You can now log in'
Select Log in
Displays the original Login Screen
Enter known email and password just created.
Displays the Home Screen as it should.
3. Start at Signup
Enter the just created entry and get the following error.
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '[email protected]' for key 'email' in C:\xampp\htdocs\php-signup-login\process-signup.php:45 Stack trace: #0 C:\xampp\htdocs\php-signup-login\process-signup.php(45): mysqli_stmt->execute() #1 {main} thrown in C:\xampp\htdocs\php-signup-login\process-signup.php on line 45
I am unsure what the message should be but certainly not a fatal error.
Here is a part of the code from process-signup.php
=======================
$stmt->bind_param("sss",
$_POST["name"],
$_POST["email"],
$password_hash);
if ($stmt->execute()) {
header("Location: signup-success.html");
exit;
=======================
Line 45 is 'if ($stmt->execute()) {'
Start with Login Screen and log in with valid info and goes to the Index.php Home page.
I never see the Javascript error messages within the various fields on the screen as shown near the end of your tutorial where the JS routine is created in the JS subdirectory.
I am happy to provide whatever else that might help.
Thank you for your help!
Dan