Поиск...
User Registration Form, Login, Logout - PHP Tutorial

User Registration Form, Login, Logout - PHP Tutorial

User Registration Form, Login, Logout - PHP Tutorial

Learn How to Create a User Registration Form in PHP. Get source code from TutsCorner.com: http://www.tutscorner.com/how-to-create-a-simple-user-registration-form-in-php/
КОММЕНТАРИИ:
Рейтинг 9.3 из 10 на основе 610 оценок и 610 отзывов.
JJ
JJ
hi how can I add admin account in this code?
Rathil Vasani
Rathil Vasani
this video was for one user and suppose i have 10 user how can i create web page to display dynamic content based on the current user login..please help
Nikunj Patel
Nikunj Patel
give me the code, who will type this code
cool333
cool333
you are smply greate man....your tutorial help me to begin with php and mysql....before watching your tutorial i had tried to watch as many as i can bt unfortunately i could not find the tutotial that i wanted to see.thanks u so much.
Shyni k v
Shyni k v
Thank u Sir...
Jeremy Jasereka
Jeremy Jasereka
Thanks brother. You are a life saver.
Xiiao Nate
Xiiao Nate
Totally helped out with my assignment. Many thanks
Đinh Tấn Thông
Đinh Tấn Thông
Thanks so much! The video is meaningfull for our!!!
Ritesh Dhoke
Ritesh Dhoke
Thank you
TheBinaryGuy
TheBinaryGuy
Thanks, it was v. helpful...
Ei Huar
Ei Huar
Thank you very much!
Brahiam Baron
Brahiam Baron
thanks broooooooo!
i love mohammad
i love mohammad
Thanks Man
Athulya Suresh
Athulya Suresh
Thanks :)
ariq rahman
ariq rahman
thank you so much for this tutorial. this tutorial clear my all concept about it. thanks again.
luis antonio uchiha madara
luis antonio uchiha madara
it helped to me a lot !!! im so thankful with you !!!! :D :D :D
kouul
kouul
thnks a lot :)
Benjamin Mosioma
Benjamin Mosioma
How can encrypt my password before saving and to db and be able to login with the unencrypted password
Sooraj Mohan
Sooraj Mohan
+benja m Watch this simple tutorial with md5 encryption PHP User Registration Form with Password Encryption: https://www.youtube.com/watch?v=H5CyDlMSDRU
John Smith
John Smith
Thanks! After many tutorial this worked for me.
kunal yadav
kunal yadav
1.Change every Mysql_ to MySqli_ 2.Add $con line as shown below $query=mysqli_query($con,"SELECT * FROM login WHERE username='".$user."' AND password='".$pass."'"); Thanks mate for code
Shariq Ayaz
Shariq Ayaz
Thank you
sajiya me
sajiya me
thanx buddy for codes !!!
GabriellaTM94
GabriellaTM94
such an easy to understand tutorial, thank you!
Jasmine Dora
Jasmine Dora
hi I am trying to login using username and password, but its not redirecting page where I want, can you please help me on this. Thanks
Sooraj Mohan
Sooraj Mohan
+Jasmine Dora A simple tutorial with md5 encryption PHP User Registration Form with Password Encryption: https://www.youtube.com/watch?v=H5CyDlMSDRU
Jasmine Dora
Jasmine Dora
+Sooraj Mohan Hi I have watched your tutorials, you have any tutorials that could help with password encryption in PHP. thanks
Sooraj Mohan
Sooraj Mohan
+Jasmine Dora In this example, after logging in, it is redirected to member.php page.. You can change it in the code.. You can download the latest code from the website link given in the description. thanks..
Rima Films
Rima Films
Thank you very much
ItsCalamari
ItsCalamari
500 Internal Server Error?
shubham khandelwal
shubham khandelwal
Hello sir i'm getting this error plz solve it help me!! Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\\xampp\\htdocs\\lucky\\login.php:15) in C:\\xampp\\htdocs\\lucky\\login.php on line 37
Hyper Connect
Hyper Connect
pls hw can i create a dashboard for ewallet in php
Hyper Connect
Hyper Connect
hello sir pls hw can i create a dashboard for ewallet in php
shubham khandelwal
shubham khandelwal
+Sooraj Mohan thank you sir now my problem is solved thanks for help :)
Sooraj Mohan
Sooraj Mohan
+shubham khandelwal Also try this:- https://www.youtube.com/watch?v=Fw4zuMpnP8E
Sooraj Mohan
Sooraj Mohan
+shubham khandelwal Try this :- https://www.youtube.com/watch?v=JD8Io8H6eZU
Duty Bryan Zamora
Duty Bryan Zamora
THANK YOUU!!!!!!
Mišel Kušer
Mišel Kušer
As simple as it is. Well done
ZenGames
ZenGames
I fixed the login form, but once i login it does not redirect me.
Sooraj Mohan
Sooraj Mohan
+ZenGames Check if the header redirect function is working.. Have you got any error messages? Header function error: https://www.youtube.com/watch?v=Fw4zuMpnP8E
Fathia Frazna Az-zahra
Fathia Frazna Az-zahra
thank you very much! It's mean a lot for me :D
Sean Pool
Sean Pool
Best code so far but I'm having problems with the login.php not taking me to the member.php, the session(); code in the login.php is coming up as an error for me. Any ideas?
Sooraj Mohan
Sooraj Mohan
+TheGamerDrago Plz check your email..
Sean Pool
Sean Pool
Thanks for the help, Ill email the code to you now
Sooraj Mohan
Sooraj Mohan
+TheGamerDrago Hi, What is the error? Have you tried latest codes from the given download link? Try with it. It is working fine for me. If you want me to check it then email to soorajtutscorner@gmail.com and comment here..
Artemis Fowl
Artemis Fowl
first one that works :) Great!
rj icu
rj icu
hi sooraj mohan, please help me to fix with my problems. I've used exactly the same source code and database like you did, but in browser when i entered the value and click login or register button, there is no any action happening . it only shows the form. Can you please tell me what's wrong
Sooraj Mohan
Sooraj Mohan
+rj icu Hi, Sorry for late reply. I was almost offline today. I'm glad it helped. Thanks for your comment..
rj icu
rj icu
+rj icu oh thanks.. its ok.. works perfectly... I forget to run on the local browser.. thats why i was having problem.... Man, spend 3 hrs to spot that... lol... anyway thanks sooraj mohan. This video helped me alot...
Tri Setya Darmawan
Tri Setya Darmawan
thanks :)
Felix Alvin
Felix Alvin
This code works fine.....thanks for your help
Surya Venkatajalapathi
Surya Venkatajalapathi
hi i saw ur video but it can not be work ...it cant show any error ...i will submit the login page means it cant print account sucessfully created...it cant show any error...wt can i do....
Sooraj Mohan
Sooraj Mohan
+Surya Venkatajalapathi Hi, It is working fine for me. Check your database and confirm if new users are registered.. Download source code from the given link in the video description. Create or import database also. Please let me know if your are still having errors..
KARMA GURUNG
KARMA GURUNG
Thank you sir! You ended my 12 hour nightmare.
Robiul Islam
Robiul Islam
Thanks for tutorial. Its all right. but does not show the "username" in the member page after welcome word. please help me.
Sooraj Mohan
Sooraj Mohan
+Robiul Islam In the member page username is displayed using session variable $_SESSION['sess_user']. Please check if session ($_SESSION['sess_user']) is set on login.php page..
Sunitha Francis
Sunitha Francis
thanks man nice video it worked for me...thanks again
Po Ki Wong
Po Ki Wong
In login.php, there is an error. if($user == $dbusername && $pass == $dbpassword) \t{ \t \t$_SESSION['sess_user']=$user; \t/* Redirect browser */ \theader("Location: member.php"); \t} Warning: Cannot modify header information - headers already sent by (output started at C:\\AppServ\\www\\login\\login.php:19) in C:\\AppServ\\www\\login\\login.php on line 45
Sooraj Mohan
Sooraj Mohan
+Po Ki Wong Hi, It is working fine for me. I think you are outputting something before sending headers.. Do not output anything before ' header("Location: member.php"); ' line.. Watch this video for details: https://www.youtube.com/watch?v=Fw4zuMpnP8E
Ar Maprangala
Ar Maprangala
@sooraj mohan thank you so much ^^ you answered my prayer .. Thank you :)
ColdGaming
ColdGaming
I've successfully created an account (I can see it in my database), however when I log in it just redirects me to the login page again. If I manually direct myself to the member.php page it works fine, however if I try to login it never redirects me. I'm sure it's something simple and I'm just missing it.
Philly Hanna
Philly Hanna
I am having the same issue, it logs me in but the redirect to the member.php does not happen. I can access the page if I type it in the address bar. Was there a solution for this?
Sooraj Mohan
Sooraj Mohan
+Dustin W. Warren I have tested same code and it works for me. Check if the code to redirect to member page - header("Location: member.php");  is working or not in your code.  \ufeff Can you send me your code and db to soorajtutscorner@gmail.com.
Dustin W. Warren
Dustin W. Warren
+Sooraj Mohan Im having the same problem with no change. I downloaded your script and built it according to how I needed it to work with my specific database...but its not working. Seems to be a problem around the WHILE loop. Are there any suggestions?
Sooraj Mohan
Sooraj Mohan
Hi, Please clear database table data, download new source code from given link (in description) and retry.. Let me know if there is any problem..
Marius Brivinskas
Marius Brivinskas
Hi Sooraj Mohan thanks for great video. However im pretty new on php , and im bit confused how does the page (register.php) knows when to give different outputs when user enters or not enters details in fields. For example user does not enters the username I was looking at the code : $sql="INSERT INTO login(username,password) VALUES('$user','$pass')"; // insert user name and password to database     $result = mysqli_query($con,$sql);     if($result){     echo "Account Successfully Created";     }     else{         echo "Failure!";         }     }     else{         echo "That username already exists! Please try again with another.";         }     }     else{         echo "All fields are required!";         }     }    And as I im wondering where in the code does it give different conditions for the different echos Thank you in advance
Sooraj Mohan
Sooraj Mohan
+Marius Vorosila Hi, You have to check if the username field is empty or not using php or javascript.  For php you can add if condition for any field instead of echo "All fields are required!"; line.. Example: if (empty($user)) {echo "Please insert a USERNAME";}
Nathan Shorter
Nathan Shorter
thankyou this worked for me 2 
Alexandros Fontrier
Alexandros Fontrier
Hello there and thanks for this great tutorial ! im getting these erros  1:Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\\wamp\\www\\register.php 2:Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given Any help will be appreciated   
Sooraj Mohan
Sooraj Mohan
+Alexandros Fontrier Hi, If you get "deprecated mysql_connect(): The mysql extension is deprecated.." errors, you need to use mysqli_connect instead and also change all other mysql_ functions. Learn more about mysqli_connect: http://php.net/manual/en/function.mysqli-connect.php  Thanks..
korah babu varghese
korah babu varghese
nice tut 
daniel navarro
daniel navarro
sir. there is an error  please help me. mysql_num_rows() expects parameter 1 to be resource, boolean given in 
Sooraj Mohan
Sooraj Mohan
+daniel navarro Hi, I think the database query result is empty.. You can print and check the result array.. Please download source code from the given link and try again..
Erik Keenan
Erik Keenan
Thank you so much, this was a great video.
Alexis Zimmer
Alexis Zimmer
I can't find the downloads in the link.
Sooraj Mohan
Sooraj Mohan
+Alexis Zimmer Thank you..The error has been fixed.. Now you can download the file...