jQuery Tutorial: Create Login Form With Ajax + PHP & MySQL

Поділитися
Вставка
  • Опубліковано 19 вер 2024

КОМЕНТАРІ • 203

  • @mingslif2
    @mingslif2 7 років тому +18

    YOU ARE THE ONLY ONE WHO EXPLAIN THE CONCEPT!!!!!! Savior

  • @loisem6207
    @loisem6207 2 роки тому +1

    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!

  • @smokinghot5373
    @smokinghot5373 5 років тому +1

    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.

    • @SenaidBacinovic
      @SenaidBacinovic  5 років тому +1

      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.

  • @ultimate_videos9778
    @ultimate_videos9778 5 років тому +2

    thank god, i found someone who explained this concept. Big thumbs up to you

  • @anselmdike2817
    @anselmdike2817 2 роки тому

    I've never ever regretted subscribing to your channel ..you're the best...

  • @corpspetilla4289
    @corpspetilla4289 4 роки тому +3

    This is one of the best tuts i've ever watched. simple, direct, and well explained. what more could you ask for?

  • @emmanuellatieku2901
    @emmanuellatieku2901 5 років тому +5

    Thank you so much! I never knew where to start and how exactly each language played a part in web development, now I do :)

  • @yusaazmi
    @yusaazmi 3 роки тому +2

    You are the best man! Thank you!

  • @kxx1an
    @kxx1an Рік тому

    As a new PHP web developer, this is just what I'm searching for. Soon, I hope, will be more PHP stuff!

    • @SenaidBacinovic
      @SenaidBacinovic  Рік тому

      Awesome, glad I could help! Yes, there will be, for sure.

  • @serixg
    @serixg 6 років тому +2

    In the name of all the students who want to start a career like you --- THANK YOU !

  • @marcostevanella6051
    @marcostevanella6051 3 роки тому +2

    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 :)

  • @gpicard1
    @gpicard1 6 років тому +1

    Excellent job. Best login demo I've seen so far.

  • @redseantlworld
    @redseantlworld 4 роки тому

    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!

  • @simohamedelasri8129
    @simohamedelasri8129 7 років тому +2

    keep it up man
    i like the way you explain , so clear and slow
    thank you

  • @shbita
    @shbita 5 років тому +1

    Thanks man for good explanations . You are a real savior .

  • @robculbertson6449
    @robculbertson6449 6 років тому +1

    Amazing! Just amazing! By far the best demonstration of this on the web! Thank you very much.

  • @sabihakhan490
    @sabihakhan490 2 роки тому +1

    it's amazing, thank you so much. I have cleared my problem.

  • @erueratait-jamieson480
    @erueratait-jamieson480 2 роки тому

    Spot on with this tutorial! Much better than many paid JQuery courses 😂

  • @raymuleya2378
    @raymuleya2378 3 роки тому

    Thank you so much...I really understood ....this really helped me a lot

  • @stanleyxavier4816
    @stanleyxavier4816 5 років тому

    This is Gold.
    Thanks Senaid...This video really helped answer some questions i had about JQuery and AJAX.
    Big Ups Senaid

  • @MLADENilic92
    @MLADENilic92 7 років тому +1

    Bravo svaka cast. Ovo je bas od pomoci.

  • @majclass2361
    @majclass2361 3 роки тому

    Thanks & Respect from India

  • @blackjark2347
    @blackjark2347 4 роки тому

    Tut on point love the simplicity of everything brought to the table

  • @billelguechi5831
    @billelguechi5831 6 років тому +1

    your way is the best bro salutations from Algeria

  • @viajador100
    @viajador100 2 роки тому +1

    Very good tutorial. Please do some more e.g. about API + AJAX

  • @Vandemataram-
    @Vandemataram- 6 років тому +1

    Very nicely explained and shown.... Thanks a lot ...

  • @dantontomacheski688
    @dantontomacheski688 4 роки тому

    MAAAAAAN AWESOME CLASS TODAY!!!!!!!!

  • @g.i.7productions217
    @g.i.7productions217 2 роки тому

    Thank You so much for this. My problem before now was how to redirect to home page after successful login using jquery. Thanks again.

  • @meerbekakimzhanov6217
    @meerbekakimzhanov6217 5 років тому +2

    Really cool video

  • @mariacristinaulloagarrido1224
    @mariacristinaulloagarrido1224 6 років тому +1

    Maravilloso, muy bien explicado...Gracias!!

  • @aldomora89
    @aldomora89 5 років тому +1

    Thank you! you help a lot with this video tutorial!

  • @JaiminsinhRajput
    @JaiminsinhRajput 6 років тому

    its amazing for me ! really only you are explain very deeply... i love it. thank you !!!

  • @HillaryChesaro
    @HillaryChesaro 4 роки тому +1

    Great code structure, thank you sir.

  • @ashikwome5374
    @ashikwome5374 5 років тому

    you are awesome man. I will suggest my friends to watch your video.

  • @DK-yb5dd
    @DK-yb5dd 5 років тому +1

    Very well explained.
    Thanks a lot.

  • @stepovyk01
    @stepovyk01 2 роки тому

    Hvala ti puno! Pozdrav iz Ukrajine!

  • @abubacarrstcham2726
    @abubacarrstcham2726 4 роки тому

    thanks for the tutorial, it help alot....my assignment was giving me headache but you cool it

  • @eduwado9012
    @eduwado9012 4 роки тому

    THANK YOU SOOO MCUH!!!! YOU HELPED ME SOLVE MY PROBLEM!!!! THANK YOU THANK YOU!!!!!

  • @devaes
    @devaes 3 роки тому

    thank you so much sir !! Advance Merry Christmas ...

  • @gotzongalletebeitia2755
    @gotzongalletebeitia2755 4 роки тому +1

    Gracias amigo

  • @AnshuYadav-ts2co
    @AnshuYadav-ts2co 5 років тому +1

    It's truly awsm video

  • @AshokKumar-do3wn
    @AshokKumar-do3wn 6 років тому +1

    thank you so much bro... for your detailed explanation :)

  • @francescopalomba4677
    @francescopalomba4677 2 роки тому +1

    Fra il migliore

  • @igormiksa949
    @igormiksa949 7 років тому +4

    Bravo buraz, jos malo engleski da ide tecnije al sve lepo polako, dopada mi se, GOOD JOB

    • @SenaidBacinovic
      @SenaidBacinovic  7 років тому +1

      Hvala druže na podršci! Bit će i engleski još bolji. :)

    • @igormiksa949
      @igormiksa949 7 років тому +2

      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

    • @SenaidBacinovic
      @SenaidBacinovic  7 років тому +1

      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 :)).

  • @AdvansLanguageSchool
    @AdvansLanguageSchool 4 роки тому

    Excellent tutorial, thank you for this!

  • @srikanthambaldhage2268
    @srikanthambaldhage2268 6 років тому +1

    Wonderful explanation bro keep it up. You have wonderful explanation skills.

  • @KayembaJoel
    @KayembaJoel 5 років тому +1

    thanks man

  • @darrylpalaubsanon4103
    @darrylpalaubsanon4103 6 років тому +1

    thanks for your effort it will help a lot!

  • @shivangijoshi7527
    @shivangijoshi7527 3 роки тому +1

    Thanks

  • @edwardiringan2461
    @edwardiringan2461 6 років тому +1

    Nice tutorial THANK YOU SIR!

  • @muhammadamir3903
    @muhammadamir3903 5 років тому +1

    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

  • @rasulali4690
    @rasulali4690 4 роки тому +1

    Dude thank you for such a useful tutorial! Where have you gone?

    • @SenaidBacinovic
      @SenaidBacinovic  4 роки тому +1

      Just smashed out with everything going on in my software company & web development agency. Thank you for asking.

  • @fares.abuali
    @fares.abuali 3 роки тому

    Thank you so much!

  • @urchoise5299
    @urchoise5299 4 роки тому

    Superb.....sir

  • @dhaval1713
    @dhaval1713 4 роки тому

    Extremely Good 🤘😎😎

  • @ginidthakur2835
    @ginidthakur2835 5 років тому +1

    very useful video please make video on how add payment gateway in PHP and how to make chating in PHP .

    • @SenaidBacinovic
      @SenaidBacinovic  5 років тому +1

      Thank you. Please check this for payment gateway:
      ua-cam.com/video/KlcqEVAO8y4/v-deo.html

  • @kenntheentrepreneur4027
    @kenntheentrepreneur4027 5 років тому +1

    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.

  • @AbhishekKumar-hd8df
    @AbhishekKumar-hd8df 4 роки тому

    Thanku sir Alot very easy and clear tutorial 👏👏👏👏👏

  • @funnyvideo-ex4kw
    @funnyvideo-ex4kw 2 роки тому

    Thank you sir

  • @dhagashchauhan4377
    @dhagashchauhan4377 3 роки тому

    THANKS!

  • @κωσταςβελουδακης
    @κωσταςβελουδακης 4 роки тому

    Truly , THANK you!!

  • @huudeveloper
    @huudeveloper 2 роки тому

    good tutorial

  • @TheEir999
    @TheEir999 3 роки тому

    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

  • @umamaheswari6529
    @umamaheswari6529 4 роки тому

    Really super

  • @mohsinrahman8107
    @mohsinrahman8107 4 роки тому

    Hi very nice explanation.. I am getting two additional curly brackets along the actual response.. what can be the possible reason?

  • @dragonghostt
    @dragonghostt 6 років тому

    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

  • @divyanshujoshi
    @divyanshujoshi 4 роки тому

    My goto Place for learning

  • @vikash151990
    @vikash151990 6 років тому +1

    nice tutorial

  • @popdaniela6882
    @popdaniela6882 6 років тому +1

    Thanks a lot! :D

  • @paulanselmendoza5178
    @paulanselmendoza5178 6 років тому +1

    This helps a LOT !!!!!!! Thank You!!!!!!!

  • @paulevans251
    @paulevans251 4 роки тому

    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!

  • @anandthoughts93
    @anandthoughts93 6 років тому +2

    there is no source code in that link...you given

  • @ricardodiaz1017
    @ricardodiaz1017 2 роки тому

    excellent

  • @testovictestovic8606
    @testovictestovic8606 3 роки тому

    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.

    • @thavirajjunglee6524
      @thavirajjunglee6524 3 роки тому

      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?

  • @ismaelyassin43
    @ismaelyassin43 5 років тому +1

    Blessed

  • @adamhardy6765
    @adamhardy6765 7 років тому +1

    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?

    • @SenaidBacinovic
      @SenaidBacinovic  7 років тому +1

      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.

  • @kisakaese
    @kisakaese 6 років тому

    Is it possible to outsource the php code in a separate file? And if so, what kind of adjustments I'd have to make?

    • @SenaidBacinovic
      @SenaidBacinovic  6 років тому

      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.

  • @mstfarhana6363
    @mstfarhana6363 6 років тому

    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

    • @SenaidBacinovic
      @SenaidBacinovic  6 років тому

      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.

  • @woutervermeersch9145
    @woutervermeersch9145 7 років тому +2

    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

    • @SenaidBacinovic
      @SenaidBacinovic  7 років тому

      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 ua-cam.com/video/tGTGYSljQG4/v-deo.html

    • @woutervermeersch9145
      @woutervermeersch9145 7 років тому +1

      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!

    • @SenaidBacinovic
      @SenaidBacinovic  7 років тому

      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. :)

  • @GerryJrGohil
    @GerryJrGohil 3 роки тому

    Is using jquery ajax in passing parameters secure?

  • @raymondbrozas8573
    @raymondbrozas8573 3 роки тому

    Please do you have a full tutorial for registration form? Ajax php mysql, I'm having hard time

  • @khaouladjouabi7270
    @khaouladjouabi7270 2 роки тому

    the lonk to the code is wrong . it leads up to a file with out any script js
    but still good job

  • @basetricks8756
    @basetricks8756 2 роки тому

    hello i have an issue LIKE:- facebook Exception:- Cross-site request forgery validation failed. Required param "state" missing from persistent data.

  • @homuncu1i
    @homuncu1i 6 років тому

    Nice video, btw, Have you seen Thor Ragnarok?

  • @hodapro3394
    @hodapro3394 2 роки тому

    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 ?

  • @edgardosericaiii4955
    @edgardosericaiii4955 4 роки тому

    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

  • @JoshuaTMagee
    @JoshuaTMagee 4 роки тому

    I love your tutorials, and thank you so much for creating them! But I'd strongly suggest that you remove the sudden "Subscribe" and "Like?" prompts. In my opinion at least, they are startling, jarring, and cheapen what are otherwise very high-quality tutorials. It would be sufficient to simply say at the beginning and/or end of each video, "If you liked this tutorial, please don't forget to like and subscribe."

  • @kazzmi175
    @kazzmi175 6 років тому +4

    Dear Senaid, I liked your first tutorial and I want to go through with this as well but the code that you are giving is not the same that you are doing. Many people have different background and sample code always good and help. I followed your complete video and created the code into 6 different parts. Whenever you test anything, I made the version. So, if anyone want to see the full complete version than open the folder Jquery6 and if you want to start from the beginning than open the folder Jquery1. Again I just want to help others are you are doing. Keep up the great work and here is the link of the sample code. www.dropbox.com/sh/angmb434d56wior/AAC63J8mlNLxh0zb1gHlFfrIa?dl=0

  • @netravatikoninte24
    @netravatikoninte24 3 роки тому

    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

  • @KennTollens
    @KennTollens 2 роки тому

    Do you have to have ajax?

  • @jyotiranjan4134
    @jyotiranjan4134 6 років тому

    Hi
    Is ajax call possible in file permissions (if I give permissions to own and group,not to world)?

    • @jyotiranjan4134
      @jyotiranjan4134 6 років тому

      I have tried but not working until I give permissions to world

  • @chazhurdm90
    @chazhurdm90 3 роки тому

    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.

  • @MuhammadAdnan-gx6rd
    @MuhammadAdnan-gx6rd 5 років тому +1

    Sir when you creating WhatsApp clone using ajax php jquery etc ? Just chatting not whole app

    • @SenaidBacinovic
      @SenaidBacinovic  5 років тому +1

      I will write it in my notes, that's all I can promise.

    • @MuhammadAdnan-gx6rd
      @MuhammadAdnan-gx6rd 5 років тому +1

      That's great. ... only chat system nog whole app sir oksy thanks I can do is waiiiiit. ....

  • @eduwado9012
    @eduwado9012 4 роки тому

    Can you help me? ajax is not reaching PHP

  • @sagarsk8196
    @sagarsk8196 5 років тому

    how to perform form action without using form action tag. please tell me?

    • @SenaidBacinovic
      @SenaidBacinovic  5 років тому

      You can use the same code from this tutorial, remove the form tag and everything will work without any problem. :)

  • @tejasar5229
    @tejasar5229 6 років тому

    Sir, make a tutorial for convert application form to PDF online & send with email...please help me sir

  • @sudhanshukumar-yu7fj
    @sudhanshukumar-yu7fj 6 років тому

    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

    • @SenaidBacinovic
      @SenaidBacinovic  6 років тому

      Have you initialized $connection variable?

    • @sudhanshukumar-yu7fj
      @sudhanshukumar-yu7fj 6 років тому

      thanks bro for replying , i was getting errors because i had't put quotes around $email and $password

    • @sudhanshukumar-yu7fj
      @sudhanshukumar-yu7fj 6 років тому

      so my query never succeded hence $data was never a object hence the error

  • @yusufhajjar2585
    @yusufhajjar2585 6 років тому

    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

    • @yusufhajjar2585
      @yusufhajjar2585 6 років тому

      coding passive income

    • @SenaidBacinovic
      @SenaidBacinovic  6 років тому

      Have you tried to code from this video tutorial?

    • @yusufhajjar2585
      @yusufhajjar2585 6 років тому

      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

  • @ahmedabdi8491
    @ahmedabdi8491 6 років тому

    i have i problem when i entered the correct email and password its not display the success message since i am using your procedure

  • @Ahmad-px4he
    @Ahmad-px4he 5 років тому

    Hello sir , i think you have not used ajax properly, if you are using ajax ...then why are you writing action =".... "& method="..." in form tag , this is a procedure of pure php . kindly correct me or correct it .