PHP Tutorials: Register & Login (Part 10): Registration Form and Validation (Part 1)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

The input type for the email can be set to "email". It won't allow users to write anything but emails otherwise it'll ask for a proper one with a speech bubble above/below the input field

AtahanToorahKiltan
Автор

if you encounter this
We tried to log you in, but. . .

You need to enter a username and password

the solution is go to widgets/login.php and close the form just like this /form

archangelyap
Автор

Yeh that was what I had done, forgotten it. I ended up scrapping the project and starting from fresh, I figure the more I type it out the more I hopefully will learn.

dashbyictfd
Автор

Charles, i had this problem too. I managed to fix it but im not completely sure how :p But i think it was because


session_start();


needs to go at the very top, not a html header. Also it didnt seem to like having gaps so fill each line with code lol.

so have that, then html head for any css you want to link, then back into the php :)

jordanp
Автор

Thought I had solved the issue, thought I just needed to include the file but now I know that was not the problem as more issues were raised. I am now trying to work backwards deleting everything entered from Part 11 section 2 down to Part 10 as everything was working fine until Part 11 end of section 1 beginning of 2.

dashbyictfd
Автор

go in the login.php and close the form tag at the end that will solve it

vaibhavtyagi
Автор

I love you guys thank you so much <3

archangelyap
Автор

Solved it, after starring at it for some time and then giving in and going to to phpacademy forum. I had not got the link for the function. I did not put the include in the aside.php page

include 'core/functions/users.php';

dashbyictfd
Автор

How about using inpUsername for the input name to avoid confusion?

steveskye
Автор

Great tutorial. Do you ever make the code available like this one? Forms are pretty straight forward but I like to avoid syntax errors.

pmmcoyv
Автор

can you please be more specific.../form where and which login file

vaibhavtyagi
Автор

do you have any tutorial on form validation with captcha pls reply me if you have

rsartandmedia
Автор

You should show how we can update this site to use mysqli

AstroGnomical
Автор

Hey guys u have a problem when i click on the register button on the form it
shows this on the page
We tried to log you in, but....
You need to enter a username and password

vaibhavtyagi
Автор

I want to pay and download this particular Tutorial, but it is difficult to find it on your website.

gregoryrose
Автор

Everything has been fine up until this point, but, whenever you click on the register submit button, the login page loads and with a log in error: You need to enter a username and password obviously I'm not logged in but could anyone offer any suggestions on why the register page isn't loading when the register button is clicked? thanks

plaguezero
Автор

include the init.php in your register.php file

tamadLazy
Автор

I have got this far, managed to follow Alex to the letter up until now, just sprung a leak and got the following error

Fatal error: Call to undefined function logged_in() in on line 3

I have checked logged_in() and cannot see where the error is

if (logged_in() === true)
include 'widgets/loggedin.php';
else
include 'widgets/login.php';

include

Anyone else come across this?

dashbyictfd
Автор

i have the same problem were u able to solve it

vaibhavtyagi
Автор

I HAVE GOT THE SAME PROBLEM, DID YOU FIX IT!

etu
welcome to shbcf.ru