I have a minor problem when running the codes. It shows "Please enter a username and password!" immediately when running it. How can I fix this? Thanks in advance. :)
when login with either correct or wrong username/password, it only show last line of if else statement which is "Please enter a user name and password"
Awesome video man really helpful! In the thumbnail of the video it says "LOGIN & REGISTRATION system" In a white text, could you tell me what that font is? I've been searching for it everywhere but couldnt find it. Maybe a strange question but i must know!!
need help here.. after i log in, this message come out. Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Thanks.
EVERYTIME I SEARCH "localhost/test/login/index.php" what is the problem? RESULT: Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/7.1.7
Sir? i'm having a problem "Parse error: syntax error, unexpected ';' in C:\php\htdocs\test\login\login.php on line 10" code line 10 to 11 " $connect = mysql_connect("localhost", "root", "") or die("Couldn't connect to the database!)"; mysql_select_db("login1") or die("Couldn't find database");"
Brother Jasper the code should look like this $connect=mysql_connect("localhost","root","") or die ("Couldn't Connect to the database"); mysql_select_db("Registration") or die ("Couldnt find to the databse"); You just made a booboo with the quotes .... Hope that soles the problem
Thanks for tutorial. I did the same but don't figure it out whenever i click on the submit button it shows me the whole contents of the login.php file and does not do anything. need help
I have followed every step in your video but still getting error as Parse error: syntax error, unexpected '$username' (T_VARIABLE), expecting ']' in C:\xampp\htdocs\test\login\login.php on line 13 can you help me with this
Hi Giannis, I am getting this error. please help me out. Notice: Use of undefined constant password - assumed 'password' in C:\xampp\htdocs\designprint\login.php on line 8 Notice: Undefined variable: nurows in C:\xampp\htdocs\designprint\login.php on line 19 Notice: Undefined variable: row in C:\xampp\htdocs\designprint\login.php on line 24 Notice: Undefined variable: row in C:\xampp\htdocs\designprint\login.php on line 25 Your password is incorrect!
I had the same thing my fix : //$connect = mysql_connect("localhost","User","Password") of my mamp local server $connect = mysql_connect("localhost","root","root") because my localhost does have a default password.
sir i got an error Notice: Undefined index: username in C:\xampp\htdocs\klent\login.php on line 21 Notice: Undefined index: password in C:\xampp\htdocs\klent\login.php on line 22 Your password is incorrect! the code in line 21 and 22 is $dbusername = $row['username']; $dbpassword = $row['password']; how to get rid of it on that error sir?
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\prova\login.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\prova\login.php on line 10
+Samuel Graham if you have time to tell me whats wrong with my code, im getting this after pressing log in. Parse error: syntax error, unexpected '$numrows' (T_VARIABLE) in C:\Tiedostot\xampp\htdocs\koelogin\login.php on line 15 this is my code around that area: 13 $query = mysqli_query("SELECT * FROM users WHERE username='$username'") 14 15 $numrows = mysqli_num_rows($query); 16 17 if($numrows!==0)
hallo brother giannis..thanks for your good videos..i learn a lot of from you.. i have problem with this now..when i execute the login.php and put name and username i get this message ( Parse error: syntax error, unexpected end of file in /opt/lampp/htdocs/A/login.php on line 32).help me please thanks
please help Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login1\login.php:8 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login1\login.php on line 8 $connect = mysql_connect("localhost", "root", "") or die("Couldn't connect!!");
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/--/public_html/login.php on line 15 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/--/public_html/login.php on line 19 Your password is incorrect!
Notice: Undefined index: root in D:\xampp\htdocs\test\login.php on line 24 Notice: Undefined index: in D:\xampp\htdocs\test\login.php on line 25 Please enter a username and a password ! I think, the code wasn't able to connect on my database. Help please
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/**/public_html/login.php on line 10 Couldn't Connect to the database!
password is root. mysqli_connect("localhost", "root", "root", "DataBase");
10 років тому
I'm glad you want to help people, but it'sreally annoying when we have to change something later because you made a mistake, so plan better. Also you just remove the md5 instead of filling in your password in the database after encoding it with md5.
please make registration system tutorials for us your explanation is very good there will bhe a great help for me if i have all tutorials about login and registration system. thanks
Thank you so much, You have saved my life. I've been looking all over trying to figure out how to do this login page and I came across a lot but I was so confused, but this tutorial has really helped me thank you so much.
Hello , im having this error Please help QUICK !! Notice: Undefined index: password in C:\xampp\htdocs\login\logininfo.php on line 5 Please enter a username and a password !!!
+Stre3tus thanks so much i already solved that problem ... But i have another one which is that i do enter a username and a password it tells me Please enter a username and a password ... Can u help me up with this ??
***** Hi I am using PHP and Mysql and have created two tables. 1. User 2. Photos. I need to make a link between the two tables where they will have a common column of Username and I want the photo to be uploaded and stored in the column of the table Photos. I have seen ur video of profile pictures. But my requirement is that the user will login and will be directed to saving as many picture as he wants and the image should be stored in the Photos tables and he should also be able to search all the saved images. Do you have any idea how to do it???
***** the problem is there since the invention of databases. Regardless when the video has been created. User inputs HAVE to be escaped to avoid serious damage to the database. Anyone with minimum knowledge of sql injection can wipe the database clean in seconds. Alternatively you can use PDO prepared statements ( i believe mysqli has them too, but PDO is better in the long run ) and have no such problems.
***** I did not meant to be harsh, it was nice of you to invest time in recording this video. But I believe that security should come prior to functionality and this is something that developers tend to forget. It is better to be rudely awakened than peacefully sleeping when it comes to security issues
Thank you soo much =) but now you should make a video on how to check all password and username about they exists so people not can write /userloggedIn/index.html and be signed in =)
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\login.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\login.php on line 10
At 6:17!
Where is mysql_real_escape_string at line 5 and 6? :@
mysql is depreciated it will not work! try mysqli and/or pdo for your extentions!
i want on submit action file different for admin & user. pls suggest how i can use two action file in one form.
do you need a register and login system and when do you need it?
is the site big?
is it going to store many users?
I have a minor problem when running the codes. It shows "Please enter a username and password!" immediately when running it. How can I fix this? Thanks in advance. :)
Kalispera jianni, theleis na kaneis mia istoselida gia mena?
when login with either correct or wrong username/password,
it only show last line of if else statement which is
"Please enter a user name and password"
Awesome video man really helpful! In the thumbnail of the video it says "LOGIN & REGISTRATION system" In a white text, could you tell me what that font is? I've been searching for it everywhere but couldnt find it. Maybe a strange question but i must know!!
Parse error: syntax error, unexpected '$numrows' (T_VARIABLE) in C:\xampp\htdocs\Koblox\Login.php on line 10 please help
how do you change from a server to a local host
need help here.. after i log in, this message come out.
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Thanks.
you teach programming in very deep level. I like your teaching skill with this video tutorial.
why we have to put @ infront of session
EVERYTIME I SEARCH "localhost/test/login/index.php" what is the problem?
RESULT:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/7.1.7
If I enter wrong password It says " the user doesn't exists" .. any solution??
Sir?
i'm having a problem "Parse error: syntax error, unexpected ';' in C:\php\htdocs\test\login\login.php on line 10"
code line 10 to 11 " $connect = mysql_connect("localhost", "root", "") or die("Couldn't connect to the database!)";
mysql_select_db("login1") or die("Couldn't find database");"
Brother Jasper the code should look like this
$connect=mysql_connect("localhost","root","") or die ("Couldn't Connect to the database");
mysql_select_db("Registration") or die ("Couldnt find to the databse");
You just made a booboo with the quotes ....
Hope that soles the problem
not working for me it still the same like that code
is it okay to use wamp instead of xampp? i try using wamp but its error
If I enter wrong password It says " the user doesn't exists" ..
Please tell me the solution to this problem??
Thanks for tutorial. I did the same but don't figure it out whenever i click on the submit button it shows me the whole contents of the login.php file and does not do anything. need help
me too
Ow..thank you..I'll try it now
what dud you use for coding/. thanks
I have followed every step in your video but still getting error as
Parse error: syntax error, unexpected '$username' (T_VARIABLE), expecting ']' in C:\xampp\htdocs\test\login\login.php on line 13
can you help me with this
why when i try it it says
( ! ) Parse error: syntax error, unexpected '$username' (T_VARIABLE) in C:\wamp\www\login2.php on line 5
+mary rose cuario same here
Hi Giannis, I am getting this error. please help me out. Notice: Use of undefined constant password - assumed 'password' in C:\xampp\htdocs\designprint\login.php on line 8
Notice: Undefined variable: nurows in C:\xampp\htdocs\designprint\login.php on line 19
Notice: Undefined variable: row in C:\xampp\htdocs\designprint\login.php on line 24
Notice: Undefined variable: row in C:\xampp\htdocs\designprint\login.php on line 25
Your password is incorrect!
which version was used
I am a beginner, doesn't it contain any explanation ?
Pls put me through on how to download the video
couldnt connect to database, whats the problem?
I had the same thing
my fix :
//$connect = mysql_connect("localhost","User","Password") of my mamp local server
$connect = mysql_connect("localhost","root","root") because my localhost does have a default password.
help me its not working.......................
sir i got an error
Notice: Undefined index: username in C:\xampp\htdocs\klent\login.php on line 21
Notice: Undefined index: password in C:\xampp\htdocs\klent\login.php on line 22
Your password is incorrect!
the code in line 21 and 22 is
$dbusername = $row['username'];
$dbpassword = $row['password'];
how to get rid of it on that error sir?
thank you very much for doing this...i learn a lot..and the style your writng the system is suit me.thanks a lot
Always better to use isset() when dealing with $_POST or any other superglobal variables.....
it is working thanks so much! :)
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\prova\login.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\prova\login.php on line 10
why no audio ?
Mine keep on saying password incorrect what can i do
Thanks
bro i am getting error in this line
$dbusername = $row('username');
$dbpassword = $row('password');
Whats the problem and i am using wamp
+Samuel Graham thank u
+Samuel Graham if you have time to tell me whats wrong with my code, im getting this after pressing log in.
Parse error: syntax error, unexpected '$numrows' (T_VARIABLE) in C:\Tiedostot\xampp\htdocs\koelogin\login.php on line 15
this is my code around that area:
13 $query = mysqli_query("SELECT * FROM users WHERE username='$username'")
14
15 $numrows = mysqli_num_rows($query);
16
17 if($numrows!==0)
thanks you man please I need your tutorial for Registration. where can I find it?
what id of a site do you need
But... i followed the tutorial and re-did it 2 times, i STILL get Undefined variables at username and password (line 5 and 6)
+Suleiman Boutzamat
correct from the start write down this
session_start ();
if(isset($_POST['submit']))
{
echo $username = $_POST['username'];
echo $password = $_POST['password'];
}
then
if ($username&&$password)
{
$connect=mysql_connect("localhost", "root", "")or die("Couldn't connect to the database");
mysql_select_db("login") or die("Couldn't find database");
$query = mysql_query("SELECT * FROM users WHERE username='$username'");
$numrows = mysql_num_rows($query);
if($numrows!==0)
{
while($row = mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
}
if($username==$dbusername&&$password==$dbpassword)
{
echo "You are logged in!";
@$_SESSION ['username'] = $username;
}
else
echo "Your password is incorrect!";
}
else
die("That user doesn't exists!");
}
else
die("Please enter a username and password!");
its login.php
hallo brother giannis..thanks for your good videos..i learn a lot of from you..
i have problem with this now..when i execute the login.php and put name and username i get this message ( Parse error: syntax error, unexpected end of file in /opt/lampp/htdocs/A/login.php on line 32).help me please thanks
Hello Giannis could you share the code plz
Thanks, it's awesome!
Great video very helpful but u have to follow it exactly
thank you beautiful work
can you give the whole code for download
please help
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login1\login.php:8 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login1\login.php on line 8
$connect = mysql_connect("localhost", "root", "") or die("Couldn't connect!!");
you can try mysqli_connect()
make please a video to explain us how we can use xampp and execute php and html with xamp..you explain very good really.
cam we get the source code?
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/--/public_html/login.php on line 15
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/--/public_html/login.php on line 19
Your password is incorrect!
Notice: Undefined index: root in D:\xampp\htdocs\test\login.php on line 24
Notice: Undefined index: in D:\xampp\htdocs\test\login.php on line 25
Please enter a username and a password !
I think, the code wasn't able to connect on my database. Help please
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/**/public_html/login.php on line 10
Couldn't Connect to the database!
+ToastyGamerGuy same here why is it sir?
+meme gogogo - need to set a username n passeprd for your datanase w/ privs
password is root.
mysqli_connect("localhost", "root", "root", "DataBase");
I'm glad you want to help people, but it'sreally annoying when we have to change something later because you made a mistake, so plan better. Also you just remove the md5 instead of filling in your password in the database after encoding it with md5.
please make registration system tutorials for us your explanation is very good there will bhe a great help for me if i have all tutorials about login and registration system. thanks
Great example!
Thank you so much, You have saved my life. I've been looking all over trying to figure out how to do this login page and I came across a lot but I was so confused, but this tutorial has really helped me thank you so much.
I keep getting Password Incorrect...
very good indeed, if the accompanied audio
thanks
nice work brother
Hello , im having this error Please help QUICK !!
Notice: Undefined index: password in C:\xampp\htdocs\login\logininfo.php on line 5
Please enter a username and a password !!!
You have to make a variable for example $password = $_POST['password'];. Check variables connected with $_POST.
+Stre3tus thanks so much i already solved that problem ... But i have another one which is that i do enter a username and a password it tells me Please enter a username and a password ... Can u help me up with this ??
Thank you it works
WARNING: This code is highly INSECURE, not strongly encrypting data. This can result in your website being hacked, etc.
Serious need: Login and registration system
Hello! I am still getting password error even when I enter the correct password
***** hello how can I contact you. I have more doubts.
***** Got the Solution Thanks for the video
***** can u tell how to upload an image in the tables of database and not server or some directory using php script??????
***** Hi I am using PHP and Mysql and have created two tables. 1. User 2. Photos. I need to make a link between the two tables where they will have a common column of Username and I want the photo to be uploaded and stored in the column of the table Photos. I have seen ur video of profile pictures. But my requirement is that the user will login and will be directed to saving as many picture as he wants and the image should be stored in the Photos tables and he should also be able to search all the saved images. Do you have any idea how to do it???
it works but the sad part is i dont know how it works btw thank you
Hmm.. Did not work..
it's really helpful...thanku :)
very good information . i want just same code for my site.
thanks
Source Code Plzz...!!!
Awsm! it works fine....
Thank you so much
yaaaaar last ka step saMJH ME NHI AAYA BCOZ TMNE BOLA KI LETS CREATE A (HTM) FILE. YAHI SE MAIN CONFUSE HO GAYA
This is great
great video
hahaha it is 2014 and you still dont sanitaze the input when you pass it to the database, no wonder sql injection still works. WHAT A JOKE!!!!
***** the problem is there since the invention of databases. Regardless when the video has been created. User inputs HAVE to be escaped to avoid serious damage to the database. Anyone with minimum knowledge of sql injection can wipe the database clean in seconds.
Alternatively you can use PDO prepared statements ( i believe mysqli has them too, but PDO is better in the long run ) and have no such problems.
***** I did not meant to be harsh, it was nice of you to invest time in recording this video. But I believe that security should come prior to functionality and this is something that developers tend to forget. It is better to be rudely awakened than peacefully sleeping when it comes to security issues
Better to use your sound also .... :(
if next time you make a tutorial with voice then will be great...hahahha
Thank you soo much =) but now you should make a video on how to check all password and username about they exists so people not can write /userloggedIn/index.html and be signed in =)
Can you give me the login.php file? :D
Its a tutorial. If he/she gave the .php file, it would prevent a lot of people from trying/learning. ;)
hate when people type the tutorial, is your voice that bad you cant talk? cant use that built in mic ? lols
thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!! i made it
www.atmaluhur.ac.id
cara bikin tulisan bergerak di website gimna ya
mysql_connect i give me an erro but mysqli_connect is works ;)
woooow beautiful one, its very
impressive can you send for me this code?
thanks its working . . . .
This is great tutorial ..........
Thanks for tuto .
thanks
very helpfull
thanks sir ji
help me please
TY
PHP Full Login System
good
Sublime Text
pl.ease
no voice over?
what a drag
sorry, but I just hate that you couldn't be bothered to talk
couldn't sub or fave
wow
nc :D
Ahahaha %69
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\login.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\login.php on line 10