How to Make Login Form in PHP and MySQL

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 641

  • @urfriendlyprogrammer3301
    @urfriendlyprogrammer3301 5 лет назад +443

    I hear Indian voice in programming tutorials I feel saved.

    • @josuevalar6465
      @josuevalar6465 4 года назад +5

      Actually you're not, that code is actually not secured against attacks from "hackers"

    • @urfriendlyprogrammer3301
      @urfriendlyprogrammer3301 4 года назад +7

      @@josuevalar6465 I did not say "safe" I said "saved". I mean, I finally found something to learn for my own project.

    • @opensourcereproduction8433
      @opensourcereproduction8433 4 года назад

      @@josuevalar6465 can you tell me what vulnerability this form has ??

    • @xdmusic3611
      @xdmusic3611 4 года назад +1

      @opensource Reproduction the vulnerabillity is "sql injextion"

    • @josuevalar6465
      @josuevalar6465 4 года назад

      @@xdmusic3611 indeed

  • @shafigaming6121
    @shafigaming6121 Год назад +1

    Waah its working , great work man

  • @marathiagrotechOfficial
    @marathiagrotechOfficial 2 года назад +2

    Thank you sir 🙏 very nice explain the SQL 👌👍🏻🙏❤️ from pune

  • @jatindranath7514
    @jatindranath7514 4 года назад

    thank you so much... for last two days I had faced a little bit problem...after show your video... I have overcome it...

  • @himehime5050
    @himehime5050 3 года назад +9

    I have to thank this guy. Been learning basics and stuff this Covid times November 2020.

    • @CCDrone
      @CCDrone 3 года назад +1

      me too :) Good luck with everything :)

    • @kerjasampinganku
      @kerjasampinganku 3 года назад

      ​@@CCDrone Try this interesting stuff too guys
      Login Form with Google Apps Script - Part 3: Connect to Database (Google Sheets)
      ruclips.net/video/Z-CXByygdxw/видео.html

  • @mathewsjoby6455
    @mathewsjoby6455 3 года назад

    Man Only Indians are posting Coding Tutorials. I am proud of my country

  • @noname-zd6wu
    @noname-zd6wu 2 года назад +2

    Just starting this video. Would be helpful if you can provide the link to your previous tutorial in the description space.

  • @mert2651
    @mert2651 3 года назад +1

    Everyone who is getting a blank page or an error should use:
    $con = mysqli_connect($host, $user, $password, $db);
    Instead of
    mysql_connect($host, $user, $password, $db);
    Apparantly mysql or php changed it in an update.

    • @mohsinaljily6011
      @mohsinaljily6011 3 года назад

      am getting a blank page i did what u say nothing happen

    • @kerjasampinganku
      @kerjasampinganku 3 года назад

      @@mohsinaljily6011 i found an alternative with apps script, and I no need hosting to publish the form. This one of my reference ruclips.net/video/Z-CXByygdxw/видео.html

    • @hasssan1124
      @hasssan1124 3 года назад

      if I wrote the username and password nothing happened. In addition the style of css is not working

  • @rechellevalladolid7431
    @rechellevalladolid7431 3 года назад +3

    u just save my final requirements this year

  • @annebernadetterama6428
    @annebernadetterama6428 3 года назад +5

    Thank you for this tutorial. It helps a lot

  • @tarunoraon1338
    @tarunoraon1338 3 года назад +1

    English achi h apki👍

  • @bit_binge
    @bit_binge Год назад +1

    And you can understanding to we 1 sentence

  • @WeeHee
    @WeeHee 4 года назад +24

    You should not follow this tutorial. He doesn't use prepared statements, which results in a very insecure backend.

    • @trifleodd
      @trifleodd 4 года назад

      Downvoted the video because of that. This is incredibly bad.

    • @crystalbytes3319
      @crystalbytes3319 4 года назад

      true. this is homework material to barely pas some test. really insecure!

    • @josuevalar6465
      @josuevalar6465 4 года назад +1

      it's just what I need to prove a point lol, so it works if you're not going to use it for an actual site

    • @josuevalar6465
      @josuevalar6465 4 года назад +1

      although prepared statements is the only thing missing to make it secure against sql injenction so I guess the rest is still valid

    • @fatinsadab3821
      @fatinsadab3821 4 года назад

      which tutorial should i follow then?

  • @vaishnavis9473
    @vaishnavis9473 Год назад

    Thank you helps a lot

  • @Gwapilevencha
    @Gwapilevencha 7 месяцев назад

    that is very good tutorial sir but for my side there is the problem on line 8 mysql_connect($host,$user,$password); that line having an problem to me when am already to fill the field in interface form

  • @kingtop171
    @kingtop171 6 лет назад +1

    GOD BLESS YOU... You really assisted Me!

  • @JustinTheVlogger
    @JustinTheVlogger 4 года назад +5

    Greetings, my code is in HTML file even though I saved it as a PHP, so what is the problem it seems that the database that I've created cannot be connected to my code?

    • @irontamil7104
      @irontamil7104 3 года назад

      while saving select all file types not only giving its name as.html will do so

  • @harrazmasri2805
    @harrazmasri2805 4 года назад +3

    thank you my man :) , that works even tho I alter it and also you need to improvise in explaining functions with visual because i dont know what those functions are for

  • @mahdikeshtani2633
    @mahdikeshtani2633 2 года назад +2

    i had this error: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\php_login.php:8 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\php_login.php on line 8
    someone answer to my problem: This is happening because mysql_connect() extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Most probably you are using the latest version of PHP. The solution for this you can use mysqli extension instead. The better option is PDO.

  • @arjunxpro
    @arjunxpro 5 лет назад +1

    Thank You so much sir...Really great sir...genuine code works with out any flaws...best explanation for PHP sqlDB i ever seen

  • @jessonotap9546
    @jessonotap9546 3 года назад +1

    please help me, I tried your code, and it says like this
    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/emulated/0/htdocs/MYPHP/login.php:8 Stack trace: #0 {main} thrown in /storage/emulated/0/htdocs/MYPHP/login.php on line 8

  • @Bacardi4
    @Bacardi4 3 года назад

    Thx you very much. Your video helped me find some typeOs which made me crazy :D

  • @cypherorpheous8680
    @cypherorpheous8680 2 года назад

    Thanks Bro...Very Helpful

  • @mdfaisal7944
    @mdfaisal7944 2 года назад

    Thank you so much 🤘😇

  • @bit_binge
    @bit_binge Год назад +1

    In this video I am not understanding your language

  • @b0x3
    @b0x3 4 года назад +15

    all i can say is hello SQL Injection

    • @RoadPirateFilms
      @RoadPirateFilms 3 года назад

      😂

    • @RoadPirateFilms
      @RoadPirateFilms 3 года назад

      mysql_ functions are not safe.

    • @b0x3
      @b0x3 3 года назад

      @@RoadPirateFilms even mysqli escape string not safe

    • @RoadPirateFilms
      @RoadPirateFilms 3 года назад

      @@b0x3 what is a safe way to it interact with a MySQL database?

  • @rolifebrirumahuru
    @rolifebrirumahuru 2 года назад

    Thank you sir. God Bless you.

  • @biltinsa
    @biltinsa 2 года назад

    great work

  • @rkbanger136
    @rkbanger136 2 года назад +1

    Hi sir actually when do that i got error like cannot start session when headers already sent by ... So please as soon as you

  • @komalavasare8108
    @komalavasare8108 2 года назад

    Thank You !!

  • @Eudes2023
    @Eudes2023 6 лет назад

    NOW, I GOT IT !
    THANKS FROM BRAZIL.

  • @ujjwalahlawat9937
    @ujjwalahlawat9937 2 года назад

    Thanks bro

  • @chaimaaGomi
    @chaimaaGomi 5 месяцев назад

    please what can replace mysql_connect in ur code cause i don't have this function

  • @techplusit
    @techplusit 2 года назад

    very nice

  • @rsantos4174
    @rsantos4174 4 года назад +2

    Thank you so much, I was looking for the answer for a problem that I had and you give me exactly that.

  • @nomanali9836
    @nomanali9836 4 года назад +5

    (Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:
    aman\htdocs\php\login.php:6 Stack trace: #0 {main} thrown in F:
    aman\htdocs\php\login.php on line 6)
    what to do?

    • @38_khushboopatel52
      @38_khushboopatel52 4 года назад +1

      Solution mila?????

    • @samina7800
      @samina7800 4 года назад

      you have to paste the entire code some where so we can help you
      post it here if you wish.

    • @flower9067
      @flower9067 3 года назад +1

      Yaa same here

  • @violentgamer5910
    @violentgamer5910 6 лет назад +12

    your website is nice and your video is also nice

    • @technicalbrothertech
      @technicalbrothertech 5 лет назад

      Whole solution of form data in just 2 minute
      ruclips.net/video/sxlmReSlaoc/видео.html

  • @tannutanwar28
    @tannutanwar28 2 года назад +2

    I'm writing this code in VS, its showing me error in line no 18 ($result =mysqli_query($sql); )

    • @tannutanwar28
      @tannutanwar28 2 года назад

      In its output , http error 405 is showing , I've watched many videos to connect database but .... everytime it shows me " http error 405 "

    • @elvislagrason2912
      @elvislagrason2912 2 года назад

      I have the same issue.
      Uncaught ArgumentCountError: mysqli_query() expects at least 2 arguments, 1 given in C:\xampp\htdocs\login.php

  • @lv0192
    @lv0192 3 года назад

    Thank for tutorial!

  • @ziauddin5763
    @ziauddin5763 5 лет назад +4

    your database name is demo not loginform . your table name is loginform .

  • @snrchannel3048
    @snrchannel3048 3 года назад +1

    Really u r great sir🙏🙏 plzz upload more projects, it useful for everyone

  • @samina7800
    @samina7800 4 года назад +2

    Please every one don't replace the mysql with mysqli so you can allow us to have some more fun

    • @SM-om6tw
      @SM-om6tw 4 года назад

      thank you for saving the code !

  • @intanhafizah9564
    @intanhafizah9564 6 лет назад +2

    Hello sir. I have copy paste your php code and change it according to my db. After i input the email and password on login form why the page does not appear "You have successfully...." and "You have entered incorrect...."? I use notepad++

    • @wassimsimouu8075
      @wassimsimouu8075 5 лет назад

      same thing for me :I

    • @ΑσημίναΑ
      @ΑσημίναΑ 3 года назад

      Hello! I had the same problem... You have to check the code file and the video at the same time, cause there are a few differences between the variables, or some things are missing...also i had to turn all the mysql to mysqli to work. Don't forget to change the example's variable names with yours! :)

  • @UltraBoiDanielSalama
    @UltraBoiDanielSalama 2 года назад

    אם הודים לא היו קיימים היה נחסך לי כל כך הרבה זמן מהחיים

  • @lainnexhyliczydjik6520
    @lainnexhyliczydjik6520 3 года назад

    What app do you use ?

  • @punjabichachi
    @punjabichachi 3 года назад +1

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\index.php:6 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\index.php on line 6
    what should i do ?

  • @KhairulIslam-xf5bu
    @KhairulIslam-xf5bu 3 года назад

    thank you so much

  • @shanti5366
    @shanti5366 4 года назад

    wow good thanx for yr help

  • @ceymendoza8236
    @ceymendoza8236 4 года назад

    I tried to copy the code of him same as with the phpMyadmin but I don't see any error or any changes on my program when I executed it, except when I refresh the UI / login page? It doesn't show the notification if I'm logged in or not. Help, please.

  • @zlackbiro
    @zlackbiro 5 лет назад +1

    Yeah, but this way with puting username and password direct in your SQl query is highly risk to be hacked from SQL injection! Guys, use PDO method to comunicate with your SQL db, prepare and execute mothod in your query!

    • @OnlineITtuts
      @OnlineITtuts  5 лет назад +1

      that's only for beginners if you want to learn advance login system please visit the channel and search login and registration

    • @kogaryu5558
      @kogaryu5558 3 года назад

      PDO won't stop you getting injection.

  • @iamdiano
    @iamdiano 2 года назад

    How did you save the files what folders did you save the files

  • @abdullahtravellersoflife368
    @abdullahtravellersoflife368 5 лет назад +2

    I guess you are using brackets to compile the codes but your's bracket is highlighting the codes where mine is not doing the same. Also, I have copied and pasted your code including CSS but there is a message saying error in line 8.

  • @saqlainramzan6640
    @saqlainramzan6640 6 лет назад

    which platform u r using ?

  • @qxqg7501
    @qxqg7501 5 лет назад +1

    ZF Cynaide now makes guides?

  • @richmondmingi8424
    @richmondmingi8424 5 лет назад

    what editor are you using

  • @NAJATECNEWS
    @NAJATECNEWS 5 лет назад +3

    thank you so much

  • @charlesojok6298
    @charlesojok6298 5 лет назад

    good website and nice videos

  • @khanbaba6169
    @khanbaba6169 6 лет назад +2

    Masha Allah Asif Bhai nice video

  • @abinashshasini577
    @abinashshasini577 5 лет назад +2

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\login.php:8 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\login.php on line 8
    sir this error is showing plz replay s soon s possible

  • @bahaatv.
    @bahaatv. 5 лет назад +10

    fatal error: uncaught error: call to undefined function mysql_connect()

  • @alyaharyanti279
    @alyaharyanti279 3 года назад +2

    hey, i have error on line 8 it says undefined function mysql_connect()
    is anyone can help me please?

    • @arnolddsouza2049
      @arnolddsouza2049 3 года назад

      change it to mysqli_connect()

    • @alyaharyanti279
      @alyaharyanti279 3 года назад

      @@arnolddsouza2049 i change it but still error

    • @arnolddsouza2049
      @arnolddsouza2049 3 года назад +2

      @@alyaharyanti279 i got it to work:

    • @kerjasampinganku
      @kerjasampinganku 3 года назад

      @@alyaharyanti279 use an alternative with apps script, no need hosting to publish it. I found this one useful ruclips.net/video/Z-CXByygdxw/видео.html

  • @manishmahour3096
    @manishmahour3096 4 года назад

    Very Informative Video, Thanks for sharing

  • @mashe53
    @mashe53 3 года назад

    sir i copy your code but your code show error this line
    mysql_connect($host,$user,$password);
    plz tell me

  • @husseinalawieh9670
    @husseinalawieh9670 3 года назад +1

    my friend u only upload 1 style code, please upload the second. thank u

  • @HanoMontano1
    @HanoMontano1 3 года назад

    great man

  • @letsgo-tu8kr
    @letsgo-tu8kr 5 лет назад

    I would like to see the all css coding,which is not available in this video about form input field and all!!

    • @OnlineITtuts
      @OnlineITtuts  5 лет назад

      please visit my channel to find the login form using html and css3, then you will able to find the video :)

  • @BECShivaKumar
    @BECShivaKumar 3 года назад

    Bro which coed editor u are using??

    • @hajji384
      @hajji384 3 года назад

      @@0xdeadbeer what extension he's using really cool theme?!

    • @hajji384
      @hajji384 3 года назад

      @@0xdeadbeer thanks

  • @zamirmushtaq9244
    @zamirmushtaq9244 2 года назад

    Very useful. Thanks

  • @TechVegan
    @TechVegan 4 года назад +1

    Nice

  • @Loyz15
    @Loyz15 6 лет назад

    BRO U ARE AWESOME!

  • @hellotech3455
    @hellotech3455 4 года назад

    it,s not working,,,i know i have error in line number 28,but plz help,i copies you same,,,,tell me about this error(
    Parse error: syntax error, unexpected '}', expecting ',' or ')' in C:\xampp\htdocs\mobiles works\login.php on line 28)

  • @drishtirajai7848
    @drishtirajai7848 Год назад

    The most bug free code on youtube!!!!

  • @callme0800god
    @callme0800god 6 лет назад +2

    I copied and pasted the source code, Im using the PHP 5.6 like you recommended and my warnings are gone. When I type something in the input field it doesnt return anything, no messages about the result. No errors on the console as well. What should I do next?

    • @truecodemedia5099
      @truecodemedia5099 6 лет назад

      Please explain some more details what problem are you having. Thanks

    • @JoshHookerJoshhook123
      @JoshHookerJoshhook123 6 лет назад +1

      update your php version

    • @dimebago
      @dimebago 5 лет назад

      Because the php sentencies are Obsolete

  • @Shaggy12321
    @Shaggy12321 5 лет назад +1

    How is this ran by clicking the button? i'm not sure i get it

  • @zareenremendies
    @zareenremendies 4 года назад

    👌👌👌👌Good content sir

  • @abeerafazal6700
    @abeerafazal6700 Год назад

    So sweet

  • @sivajyothinarala7825
    @sivajyothinarala7825 2 года назад

    Sir please tell me .what type of app used in this editing

  • @rabiaahmad1769
    @rabiaahmad1769 4 года назад

    Urdu mn lecture dety to better tha any way its a good job

  • @dabneeghmooblajsabchannel202
    @dabneeghmooblajsabchannel202 5 лет назад +1

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\TTCN\index.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\TTCN\index.php on line 7 It IS NOT WORKING

    • @liladounas9639
      @liladounas9639 5 лет назад +1

      Peut-être la version de votre php>5
      Remplace cette fonction par mysqli_connect();

  • @yusufsunset4619
    @yusufsunset4619 6 лет назад +1

    Thank You So much This Lesson Is Very Useful 👍

  • @itbhailog5229
    @itbhailog5229 3 года назад

    why you are use ID in data table because we want only 2 data username and password. plez give answers????????

  • @bit_binge
    @bit_binge Год назад +1

    I am give rate 5 into 2 😒

  • @huonglexuan1799
    @huonglexuan1799 4 года назад

    what is application you using ?

  • @kangkangorboda5534
    @kangkangorboda5534 5 лет назад +6

    first of all you need to show us how to save folder to see that viewer will understand
    thanks :)

  • @pushpendersingh6577
    @pushpendersingh6577 2 года назад

    login page code is full of bug and showing fatal error and main problem showing parent directory and css3 folder and login.php file. At the place of opening website on local server.

  • @pavanprasad9359
    @pavanprasad9359 3 года назад

    It was really helpful 😊

  • @karishmabhoir6715
    @karishmabhoir6715 5 лет назад

    i copy all your source code posted on the link but i have an error icon is not display. solution plz.

  • @joshuavalencia1819
    @joshuavalencia1819 5 лет назад +7

    hello sir i just want to ask if you have a tutorial similar to this one but there's a little bit different like , multi log in with different role's for example admin , and user . if the admin enter his account he will redirect to admin page and when user enter his account he will redirect to different page intended for user only . i mean , so that the user cant access the management which can only work for admin only . thank you .

    • @mutalemulenga8708
      @mutalemulenga8708 4 года назад

      I can teach you how to do this.

    • @SantoshKumar-do3ec
      @SantoshKumar-do3ec 4 года назад

      @@mutalemulenga8708 teach me please

    • @mutalemulenga8708
      @mutalemulenga8708 4 года назад

      @@SantoshKumar-do3ec I made a tutorial on my channel... ruclips.net/video/EOsgb_50rJM/видео.html
      If you still need clarification, let me know.

    • @SantoshKumar-do3ec
      @SantoshKumar-do3ec 4 года назад

      @@mutalemulenga8708 I want to talk to you bro once......I want some help regarding my project

    • @mutalemulenga8708
      @mutalemulenga8708 4 года назад +1

      @@SantoshKumar-do3ec there is an email on my channel. Send me an Email. will be glad to look see if i can help.

  • @ryanbarrera2595
    @ryanbarrera2595 5 лет назад +16

    Very nice but it would be much more nice if you also include the css section.

  • @palemohamedsiemohamed4828
    @palemohamedsiemohamed4828 Год назад

    Merci beaucoup mettre

  • @nishthapahwa4625
    @nishthapahwa4625 5 лет назад +1

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login.php on line 9 ???? kindly suggest

    • @grationroshan6922
      @grationroshan6922 5 лет назад +1

      you are using php 2017 version which does not have mysql extension instead use mysqli pdo it should work

    • @nishthapahwa4625
      @nishthapahwa4625 5 лет назад

      ​@@grationroshan6922

    • @nishthapahwa4625
      @nishthapahwa4625 5 лет назад

      @@grationroshan6922 Thanks for the help I get it

    • @nishthapahwa4625
      @nishthapahwa4625 5 лет назад

      Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\login.php on line 10 login page showed but this error coming

    • @nishthapahwa4625
      @nishthapahwa4625 5 лет назад

      Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\login.php on line 10
      Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\login.php:18 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login.php on line 18

  • @nizamuddinkhan8958
    @nizamuddinkhan8958 6 лет назад

    Nice asif sir

  • @MICROREPAIR
    @MICROREPAIR 3 года назад

    i installed extension emmet to get colours on my text, how can i get the text with different colours

  • @hassnainmh2048
    @hassnainmh2048 6 лет назад

    Very very useful it made my day.

  • @azamfatima0101
    @azamfatima0101 4 года назад +1

    Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\Project\process.php on line 9

    • @md.hasanuzzaman0001
      @md.hasanuzzaman0001 4 года назад +1

      same problem ,,, notice this line,, Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in E:\PHP\htdocs\login_php\index.php on line 12

    • @mustafaali6419
      @mustafaali6419 4 года назад

      @@md.hasanuzzaman0001 can i help you sir ?

    • @sinjaghimire8319
      @sinjaghimire8319 4 года назад

      @@md.hasanuzzaman0001 same problem

    • @freddiemandez6967
      @freddiemandez6967 4 года назад

      @@mustafaali6419 notice this line,, Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in E:\PHP\htdocs\login_php\index.php on line 12
      1
      please help me i have the same problem

  • @jmmacatangay_grizzlybear
    @jmmacatangay_grizzlybear 6 лет назад

    What are the software that you uses in making this?

    • @OnlineITtuts
      @OnlineITtuts  6 лет назад

      I designed the form using HTML5 and CSS3, And I used Php MySQL Database.

    • @adevborxe-dm2ov
      @adevborxe-dm2ov 5 лет назад

      Xampp app and notepad

  • @pranitharegati3765
    @pranitharegati3765 4 года назад

    Useful video

  • @natureandfun62
    @natureandfun62 5 лет назад +1

    Aray asif baie..... Hindi/urdu mai baat kroo na... Taki sab aap koo samjay... ((( warna kya faida.... Jab aap koo samjana na aayai n logu koo samj naa aayai.. (? (? So plxxx... Try to make ur videos in hindi (? (?

  • @icasemobileservicecenter3293
    @icasemobileservicecenter3293 5 лет назад

    hi sir , how to open another from in php ?

  • @sajibbhuyan4017
    @sajibbhuyan4017 4 года назад

    you should write if(isset($_POST['LOGIN'])){}.But there you use username your from sumit filed write name="Login" but when userdo hit login but you here write username