Merci beaucoup, je suis débutante en Javascript et j'avais beaucoup de mal à trouver un cours facile à suivre. Votre cours est très bien fait car on comprend toutes les étapes, j'ai beaucoup appris ! Et votre anglais est très compréhensible quand on n'est pas vraiment bilingue!
It's my first time finishing a project in php successfully. Thank you so much. I had to change this //header(string: 'Location: hidden.php'); to this header('Location: hidden.php'); and this //$connection = new mysqli(host: 'localhost', username: 'root', passwd: '', dbname: 'loginTutorial'); to this $connection = new mysqli('localhost', 'root', '', 'loginTutorial'); Not sure exactly why. Somebody else in the comment section had modified it in their own code so I just copied and it worked.
Glad you made it. Well, those "host:, username: dbname:, string:" etc. you don't need in the code, those "tags" are added by PHPStorm so I can easier know which parameter I should send, but basically that doesn't exists in my code.
Thank you for this amazing tutorial. like others said, this is high level education that rarely can be found. Thank you so much man! Will be following you from now on :)
Wow, you are a rare find. I can't thank you enough for this tutorial. The detailed explanation leaves all the others behind. I seriously wasn't expecting such a high standard of education. I rate this stuff at the university level. I have bought courses online and they come nowhere near this tutorial, period. The detail is just amazing, to be honest from my experience. What's even more amazing is your giving away this knowledge FREE! I felt that I needed to appreciate your efforts here. Thanks, man!
This is a great tutorial and helped a lot. If I wanted to migrate this to a constrained device which doesn't have PHP available and may have to use a fake filesystem, is there an alternative to php/mysql that you would recommend? Thanks!
Kisa Käse Which part do you want to move? If you want to move the part thay handle ajax requests, than all you need to do is to copy/paste to new file and change the url of ajax request to that file.
how can i get user information like his name and phone number when he log in ? i want when i log in index file open and then i find my name that was stored in database is there and my profile you know how to do this ?
First of all i would like to thank you for the awesome & usefull tutorials... Indeed, i'd really like to know how to get a redirection back to the same page you were at with a certain id or name after you logged out & you logged in again. For example if i was in page called profile.php?id=1 then i logged out After that i logged in again how can get redirected back to the last page i was at before i logged out, And Thank you.
how did you achieve it? The first thing that comes to my mind is to save the page (name) the person is currently in . When logged out, the last current will be stored and used again upon login. Is there another way?
E mogao bi da objasnis OOP na svom kanalu, za sta se tacno koristi protected i private mislim na primere u produkciji sto se stavlja statik i koji je benefit toga, sto se koristi __construct i sto se koriste apstraktne klase i __autoload to nema nigde lepo obajsnjeno samo najprostiji primeri a sustina i prava korisnost toga nigde svi pricaju ono sto mozes da nadjes bilo gde
Igor Mikša Hvala druze na ideji. Trenutno sam baziran na osnove web development-a, ali cu poslije imati tutoriale vezane za OOP, razlicite framework-e itd., tako da kada na taj dio predjem, detaljno cu obraditi sve sto si pitao (zapisao sam :)).
Hello Sir Thanks a lot for this tutorial. It is helpful and very easy to learn as you.d said. But i need a suggestion on a login with three user tables.Like I wanted to login as teacher,student and admin. Ive created three tables but unable to create a logic on this.Can you help me on this
Why three different tables? You can have one "users" table, and in that table have one column that will be "role". So, on a login page, you will just check the value of that "role" column, store it in the $_SESSION and later just based on that value show different content.
strictly for security reasons, can someone see the php code in the debugger. for instance if someone right click and click inspect element, would someone be able to see the php code?
muy buen tutorial como todos los que tienes, en este caso seria bueno explicar como tener multiples niveles de usuario y ver solo algunas cosas según sus características saludos y gracias
Thank you soo much, thank you soo much, thank you soo much. I got stack on how I can make my modal stay unsubmitted while validation is done and I have just found a solution right here. Thank you once more.
hi, I have tried this code following everything but apparently its not working. I checked all codes carefully and im sure that everything is correct as per your tutorial but still nothing happens when I click the button. I'm not sure what is the problem. Is there anything I miss here? thanks
Loved this tutorial, wanted to know for so long how they did the validation without refreshing the page!!, So we could make it update even without pushing the button but just by $('input#email').bind('input propertychange', function() in case of a registration it could be very interesting to see if a certain username is already taken or not, if my practice seems not correct on the live update when typing, pls share you're thoughts
Thank you! Your practice will be correct if you're using it on the registration form, so you want to check if a username is available or not. However, using it on the login page is not the best, because on that way you're making one security mistake. The security mistake is that an attacker will be able to brute force your username until he finds the correct one. Also, once he knows the username, he can try to execute brute force attack for password too. BTW, if you want to learn a lot more about form validation by using jQuery, then you should check th-cam.com/video/tGTGYSljQG4/w-d-xo.html
Ty so much for you're reply ,.. I have implemented it now only on the registration part of my website, as it doesn't check the database against passwords but only usernames and emails, I don't think it's considered as a security breach ? Ty for the link I'll go check it right away!
You should be fine with that approach because many times attackers will go directly to the login page and won't try to find a username through the registration page. :)
Recoverable fatal error: Object of class mysqli could not be converted to string in G:\xamp\htdocs\PHPDatabaseExample\login.php on line 26 getting this error
mister i have problem in html i put this in js i put this $(function() { $('#login').ajaxForm({ url: 'login.php',}, success: function(data) { the question is are the data will posting to login page annd how i can reciver it please help me
At first I like your thank you, the explanation is wonderful And excuse me for my language I am from Syria no i not tried the same code in this video but you almost lonly talk about jquery form library my question is i put in html : ...... and in is page i use: $(function() { $('#login').ajaxForm({ url: 'login.php', success: function(data) { if (data.status == 200 || data.status == 600) { window.location.href = data.location; } }); $('#login input').on('click', function(e) { $state.html(login_button_text); }); }); ............ in login.php page i put But it does not work, is it true Thanks for your help
Pretty odd, my PHP will not work. The "exit" commands don't output anything. Not even a simple echo statement works.. The ajax seems to work this is what I see in the Headers: "Request URL: localhost/learn/ajax/login.php?login=1&emailPHP=asdaf&passwordPHP=dgsdga Request Method: GET Status Code: 200 OK Remote Address: [::1]:80 Referrer Policy: strict-origin-when-cross-origin" However my response is not like yours, its the entire html document without the PHP. My code is identical to yours so it may be a 'wiring' kind of problem. Im using XAMP and have the files in the htdocs folder.
My instructor asked me to make all script like php JavaScript etc in separate files and the main file should be named as .html and not .php. How to achieve this? I have to submit it tomorrow.
please help @senaid these are snippets of my code from login.php ..... $data = $connection->query("SELECT id FROM login_table WHERE email = $email AND password = $password "); if($data->num_rows >0){ exit('success');} else exit('failed'); ......... and i get " Notice: Trying to get property of non-object in C:\xampp\htdocs\socialConnect2\login1.php on line 15 failed " in the console please help me out figure out the problem
I've never ever regretted subscribing to your channel ..you're the best...
Wow, thank you!
Merci beaucoup, je suis débutante en Javascript et j'avais beaucoup de mal à trouver un cours facile à suivre. Votre cours est très bien fait car on comprend toutes les étapes, j'ai beaucoup appris ! Et votre anglais est très compréhensible quand on n'est pas vraiment bilingue!
YOU ARE THE ONLY ONE WHO EXPLAIN THE CONCEPT!!!!!! Savior
Thank you so much! :)
thank god, i found someone who explained this concept. Big thumbs up to you
It's my first time finishing a project in php successfully. Thank you so much.
I had to change this
//header(string: 'Location: hidden.php');
to this
header('Location: hidden.php');
and this
//$connection = new mysqli(host: 'localhost', username: 'root', passwd: '', dbname: 'loginTutorial');
to this
$connection = new mysqli('localhost', 'root', '', 'loginTutorial');
Not sure exactly why.
Somebody else in the comment section had modified it in their own code so I just copied and it worked.
Glad you made it. Well, those "host:, username: dbname:, string:" etc. you don't need in the code, those "tags" are added by PHPStorm so I can easier know which parameter I should send, but basically that doesn't exists in my code.
As a new PHP web developer, this is just what I'm searching for. Soon, I hope, will be more PHP stuff!
Awesome, glad I could help! Yes, there will be, for sure.
You are the best man! Thank you!
You're welcome!
This is one of the best tuts i've ever watched. simple, direct, and well explained. what more could you ask for?
Excellent job. Best login demo I've seen so far.
gpicard1 thank you :)
Spot on with this tutorial! Much better than many paid JQuery courses 😂
Great to hear!
Very good tutorial. Please do some more e.g. about API + AJAX
Will do!
Thank you so much...I really understood ....this really helped me a lot
Thank you so much! I never knew where to start and how exactly each language played a part in web development, now I do :)
My pleasure, thank you!
it's amazing, thank you so much. I have cleared my problem.
Glad it helped!
In the name of all the students who want to start a career like you --- THANK YOU !
Ohh, thank you so much!
Thanks man for good explanations . You are a real savior .
Glad I could help :)
Thank you for this amazing tutorial. like others said, this is high level education that rarely can be found. Thank you so much man! Will be following you from now on :)
Appreciate that! New videos coming soon! :D
Hi very nice explanation.. I am getting two additional curly brackets along the actual response.. what can be the possible reason?
Fra il migliore
Veramente il più potente degli esseri
Wow, you are a rare find. I can't thank you enough for this tutorial. The detailed explanation leaves all the others behind. I seriously wasn't expecting such a high standard of education. I rate this stuff at the university level. I have bought courses online and they come nowhere near this tutorial, period. The detail is just amazing, to be honest from my experience. What's even more amazing is your giving away this knowledge FREE! I felt that I needed to appreciate your efforts here. Thanks, man!
BIG words, thank you so much!
Thank You so much for this. My problem before now was how to redirect to home page after successful login using jquery. Thanks again.
Amazing! Just amazing! By far the best demonstration of this on the web! Thank you very much.
thank you :)
Bravo svaka cast. Ovo je bas od pomoci.
Hvala puno!
just one question for the sign up form the only thing that changes is the query with INSERT instead of SELECT?
Thank you in advance
keep it up man
i like the way you explain , so clear and slow
thank you
ELASRI Mohamed Thank you! :)
Dude thank you for such a useful tutorial! Where have you gone?
Just smashed out with everything going on in my software company & web development agency. Thank you for asking.
This is Gold.
Thanks Senaid...This video really helped answer some questions i had about JQuery and AJAX.
Big Ups Senaid
Very nicely explained and shown.... Thanks a lot ...
thank you :)
Thanks & Respect from India
you are awesome man. I will suggest my friends to watch your video.
thanks for the tutorial, it help alot....my assignment was giving me headache but you cool it
Glad it helped!
Hvala ti puno! Pozdrav iz Ukrajine!
thank you so much sir !! Advance Merry Christmas ...
MAAAAAAN AWESOME CLASS TODAY!!!!!!!!
your way is the best bro salutations from Algeria
thank you :)
Is using jquery ajax in passing parameters secure?
Tut on point love the simplicity of everything brought to the table
Thank you dear sir i have learn this login form if you have don't issue so please sir make the full course of ajax tutorial
This is a great tutorial and helped a lot. If I wanted to migrate this to a constrained device which doesn't have PHP available and may have to use a fake filesystem, is there an alternative to php/mysql that you would recommend? Thanks!
Thank you! you help a lot with this video tutorial!
You're welcome!
Wonderful explanation bro keep it up. You have wonderful explanation skills.
thank you :)
no wonder you didn't bother about your coding skills rather than explanation!! xD
@@sammitneupane8486 hmmm?
Really cool video
Thank you :)
Is it possible to outsource the php code in a separate file? And if so, what kind of adjustments I'd have to make?
Kisa Käse Which part do you want to move? If you want to move the part thay handle ajax requests, than all you need to do is to copy/paste to new file and change the url of ajax request to that file.
It's truly awsm video
Thank you :)
Very well explained.
Thanks a lot.
My pleasure, thank you!
there is no source code in that link...you given
THANK YOU SOOO MCUH!!!! YOU HELPED ME SOLVE MY PROBLEM!!!! THANK YOU THANK YOU!!!!!
Do you have to have ajax?
Maravilloso, muy bien explicado...Gracias!!
gracias :)
Great code structure, thank you sir.
Gracias amigo
Extremely Good 🤘😎😎
its amazing for me ! really only you are explain very deeply... i love it. thank you !!!
thanks for your effort it will help a lot!
my pleasure!
very useful video please make video on how add payment gateway in PHP and how to make chating in PHP .
Thank you. Please check this for payment gateway:
th-cam.com/video/KlcqEVAO8y4/w-d-xo.html
Thanku sir Alot very easy and clear tutorial 👏👏👏👏👏
Glad I could help :)
Please do you have a full tutorial for registration form? Ajax php mysql, I'm having hard time
Superb.....sir
how can i get user information like his name and phone number when he log in ? i want when i log in index file open and then i find my name that was stored in database is there and my profile you know how to do this ?
Excellent tutorial, thank you for this!
First of all i would like to thank you for the awesome & usefull tutorials...
Indeed, i'd really like to know how to get a redirection back to the same page you were at with a certain id or name after you logged out & you logged in again.
For example if i was in page called profile.php?id=1 then i logged out
After that i logged in again how can get redirected back to the last page i was at before i logged out,
And Thank you.
how did you achieve it? The first thing that comes to my mind is to save the page (name) the person is currently in . When logged out, the last current will be stored and used again upon login. Is there another way?
Hi
Is ajax call possible in file permissions (if I give permissions to own and group,not to world)?
I have tried but not working until I give permissions to world
Thank you so much!
Bravo buraz, jos malo engleski da ide tecnije al sve lepo polako, dopada mi se, GOOD JOB
Hvala druže na podršci! Bit će i engleski još bolji. :)
E mogao bi da objasnis OOP na svom kanalu, za sta se tacno koristi protected i private mislim na primere u produkciji sto se stavlja statik i koji je benefit toga, sto se koristi __construct i sto se koriste apstraktne klase i __autoload to nema nigde lepo obajsnjeno samo najprostiji primeri a sustina i prava korisnost toga nigde svi pricaju ono sto mozes da nadjes bilo gde
Igor Mikša Hvala druze na ideji. Trenutno sam baziran na osnove web development-a, ali cu poslije imati tutoriale vezane za OOP, razlicite framework-e itd., tako da kada na taj dio predjem, detaljno cu obraditi sve sto si pitao (zapisao sam :)).
Hello Sir Thanks a lot for this tutorial. It is helpful and very easy to learn as you.d said. But i need a suggestion on a login with three user tables.Like I wanted to login as teacher,student and admin. Ive created three tables but unable to create a logic on this.Can you help me on this
Why three different tables? You can have one "users" table, and in that table have one column that will be "role". So, on a login page, you will just check the value of that "role" column, store it in the $_SESSION and later just based on that value show different content.
thank you so much bro... for your detailed explanation :)
thank you :)
strictly for security reasons, can someone see the php code in the debugger. for instance if someone right click and click inspect element, would someone be able to see the php code?
adam hardy No, that is not possible because PHP is server-side language. If it is possible, then there wouldn't be any website that is secure.
Can you help me? ajax is not reaching PHP
Nice tutorial THANK YOU SIR!
thank you :)
muy buen tutorial como todos los que tienes, en este caso seria bueno explicar como tener multiples niveles de usuario y ver solo algunas cosas según sus características saludos y gracias
hello i have an issue LIKE:- facebook Exception:- Cross-site request forgery validation failed. Required param "state" missing from persistent data.
Thank you soo much, thank you soo much, thank you soo much. I got stack on how I can make my modal stay unsubmitted while validation is done and I have just found a solution right here. Thank you once more.
My pleasure!
Really super
Thank you sir
good tutorial
hi, I have tried this code following everything but apparently its not working. I checked all codes carefully and im sure that everything is correct as per your tutorial but still nothing happens when I click the button. I'm not sure what is the problem. Is there anything I miss here? thanks
Sir when you creating WhatsApp clone using ajax php jquery etc ? Just chatting not whole app
I will write it in my notes, that's all I can promise.
That's great. ... only chat system nog whole app sir oksy thanks I can do is waiiiiit. ....
This helps a LOT !!!!!!! Thank You!!!!!!!
Awesome, glad I could help. :)
how to perform form action without using form action tag. please tell me?
You can use the same code from this tutorial, remove the form tag and everything will work without any problem. :)
thx man
My pleasure.
nice tutorial
thank you :)
THANKS!
the lonk to the code is wrong . it leads up to a file with out any script js
but still good job
Truly , THANK you!!
i have i problem when i entered the correct email and password its not display the success message since i am using your procedure
Can you show me the code?
Loved this tutorial, wanted to know for so long how they did the validation without refreshing the page!!,
So we could make it update even without pushing the button but just by $('input#email').bind('input propertychange', function() in case of a registration it could be very interesting to see if a certain username is already taken or not, if my practice seems not correct on the live update when typing, pls share you're thoughts
Thank you! Your practice will be correct if you're using it on the registration form, so you want to check if a username is available or not.
However, using it on the login page is not the best, because on that way you're making one security mistake. The security mistake is that an attacker will be able to brute force your username until he finds the correct one. Also, once he knows the username, he can try to execute brute force attack for password too.
BTW, if you want to learn a lot more about form validation by using jQuery, then you should check th-cam.com/video/tGTGYSljQG4/w-d-xo.html
Ty so much for you're reply ,.. I have implemented it now only on the registration part of my website, as it doesn't check the database against passwords but only usernames and emails, I don't think it's considered as a security breach ?
Ty for the link I'll go check it right away!
You should be fine with that approach because many times attackers will go directly to the login page and won't try to find a username through the registration page. :)
Thanks a lot! :D
thank you :)
excellent
Thank you :)
How do I get ajax? do I have to install it? and where do i get it if so
Just include the jQuery library, the same way I did it at the beginning of this video.
My goto Place for learning
Thank you!
Recoverable fatal error: Object of class mysqli could not be converted to string in G:\xamp\htdocs\PHPDatabaseExample\login.php on line 26 getting this error
mister i have problem in html i put this
in js i put this
$(function() {
$('#login').ajaxForm({
url: 'login.php',},
success: function(data) {
the question is are the data will posting to login page annd how i can reciver it please help me
coding passive income
Have you tried to code from this video tutorial?
At first I like your thank you, the explanation is wonderful
And excuse me for my language I am from Syria
no i not tried the same code in this video but you almost lonly talk about jquery form library
my question is
i put in html :
......
and in is page i use:
$(function() {
$('#login').ajaxForm({
url: 'login.php',
success: function(data) {
if (data.status == 200 || data.status == 600) {
window.location.href = data.location;
}
});
$('#login input').on('click', function(e) {
$state.html(login_button_text);
});
});
............
in login.php page i put
But it does not work, is it true
Thanks for your help
Code in the video is no visible and legible.
Nice video, btw, Have you seen Thor Ragnarok?
Thank you. I haven't, why? :)
Pretty odd, my PHP will not work. The "exit" commands don't output anything. Not even a simple echo statement works.. The ajax seems to work this is what I see in the Headers:
"Request URL: localhost/learn/ajax/login.php?login=1&emailPHP=asdaf&passwordPHP=dgsdga
Request Method: GET
Status Code: 200 OK
Remote Address: [::1]:80
Referrer Policy: strict-origin-when-cross-origin"
However my response is not like yours, its the entire html document without the PHP. My code is identical to yours so it may be a 'wiring' kind of problem. Im using XAMP and have the files in the htdocs folder.
My instructor asked me to make all script like php JavaScript etc in separate files and the main file should be named as .html and not .php. How to achieve this?
I have to submit it tomorrow.
Just put all the Javascript code in files and include it in your HTML. Also, all PHP code move in its own files, and thats it.
@@SenaidBacinovic Thank you! I can try it as the deadline is extended to this monday.
@@abhishekpal7291 good luck
Thanks
thank you :)
sir ,i am getting error while creating session ..can you help me
What is the problem?
cant get The response to work ....
What exactly is the problem?
www.dropbox.com/sh/angmb434d56wior/AAC63J8mlNLxh0zb1gHlFfrIa?dl=0 check it here and it will work
please help @senaid
these are snippets of my code from login.php
.....
$data = $connection->query("SELECT id FROM login_table WHERE email = $email AND password = $password ");
if($data->num_rows >0){
exit('success');}
else
exit('failed');
.........
and i get
" Notice: Trying to get property of non-object in C:\xampp\htdocs\socialConnect2\login1.php on line 15
failed "
in the console please help me out figure out the problem
Have you initialized $connection variable?
thanks bro for replying , i was getting errors because i had't put quotes around $email and $password
so my query never succeded hence $data was never a object hence the error