PHP and MySQL with CRUD Operations: Create, Read, Update, Delete

Sdílet
Vložit
  • čas přidán 18. 05. 2022
  • Create Web Application using PHP and MySQL. How to connect to mysql database using PHP. How to fill HTML table from database using PHP. How to perform CRUD operations using PHP and MySQL.
    ********************************
    Source code on Patreon: / php-and-mysql-84465280
    ********************************
    Install XAMPP: • How to Install XAMPP 8...
    ********************************
    SQL Queries:
    CREATE TABLE clients (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR (100) NOT NULL,
    email VARCHAR (200) NOT NULL UNIQUE,
    phone VARCHAR(20) NULL,
    address VARCHAR(200) NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
    );
    INSERT INTO clients (name, email, phone, address)
    VALUES
    ('Bill Gates', 'bill.gates@microsoft.com', '+123456789', 'New York, USA'),
    ('Elon Musk', 'elon.musk@spacex.com', '+111222333', 'Florida, USA'),
    ('Will Smith', 'will.smith@gmail.com', '+111333555', 'California, USA'),
    ('Bob Marley', 'bob@gmail.com', '+111555999', 'Texas, USA'),
    ('Cristiano Ronaldo', 'cristiano.ronaldo@gmail.com', '+32447788993', 'Manchester, England'),
    ('Boris Johnson', 'boris.johnson@gmail.com', '+4499778855', 'London, England');
    *************************** .
    ***********************************
    🔥 Complete Udemy Courses :
    Build E-commerce Web Application using ASP.NET Core : www.udemy.com/course/aspnet-c...
    Build E-commerce Web API using ASP.NET Core : www.udemy.com/course/build-as...
    Build E-commerce Web Application using React JS : www.udemy.com/course/build-co...
    ⬇️ Free Document Proofreading ⬇️
    ► Grammarly : grammarly.go2cloud.org/SH3YB

Komentáře • 209

  • @alfredgithinji3166
    @alfredgithinji3166 Před rokem +8

    Wow! What an awesome video. I am already feeling confident working with PHP having come from the JavaScript world.

  • @happythrottlemotomedia5529

    I just started studying Visual Studio and you my friend is the best and my favorite teacher. Thank you

  • @A_ALI24
    @A_ALI24 Před 2 lety +6

    Concise course. Well prepared. Well presented. Thank you very much. Keep up. All the best.

  • @carlosjunior2108
    @carlosjunior2108 Před 7 měsíci +3

    Excelent video! I'm brazilian and with my poour english i managed to do. You are very good teacher.

  • @abdulhaq6060
    @abdulhaq6060 Před 2 lety +3

    I love your programming tutorials on CZcams.

  • @murtazausmani7004
    @murtazausmani7004 Před rokem +3

    I Love You Mate, I was doing a freelance project and I was stuck but you helped me! Thanks

  • @MrTizinator
    @MrTizinator Před rokem +1

    Appreciate it that Bob also made it on the list

  • @mineaks
    @mineaks Před rokem

    Great video. Thanks for the effort taken to show this

  • @fishworxify
    @fishworxify Před měsícem

    AWESOME!!! Just what I was looking for. Beautifully explained and presented!!!!

  • @Kashalot24
    @Kashalot24 Před 6 měsíci

    Thank you so much! Everything is worked. You really helped me. Thank you, teacher

  • @Sai-nr4tw
    @Sai-nr4tw Před rokem +1

    THANK YOU MISTER THIS REALLY A BIG HELP IN MY CAPSTONE PROJECT!!! THANKS YOU VERYY MUCHHHH

  • @ramsuthar3473
    @ramsuthar3473 Před rokem +5

    This tutorial is amazing and you are really good at teaching !! great job sir !

  • @fernavas123
    @fernavas123 Před rokem

    Thanks! Excellent video! Really helped me. Congrats! You're amazing

  • @SoftwareScience
    @SoftwareScience Před rokem

    Thanks the best CRUD video on this platform

  • @randyortiz6151
    @randyortiz6151 Před rokem +2

    This is an excellent lesson and the code works. Thank You!😊

  • @user-ld2yx6vs9t
    @user-ld2yx6vs9t Před 4 měsíci

    It was really helpful. Thank you very much!

  • @user-so5he3op1q
    @user-so5he3op1q Před rokem +3

    شرح اكثر من رائع شكرا لك عزيزي

  • @HansAllende
    @HansAllende Před rokem

    So easy explain, very helpful, thanks!

  • @phc_kaodin
    @phc_kaodin Před 2 lety

    Thank you for making such a great tutorial

  • @infodiff
    @infodiff Před 4 měsíci +1

    Thank you so much. Joined u on patreon as well.

  • @abdumunib2417
    @abdumunib2417 Před 2 lety

    Good one , easy explanation short method thanx it helped alot in my project

  • @BhootFmOfficial786
    @BhootFmOfficial786 Před 2 lety +2

    Amazing. i have just watched this full video. easy explanation.
    waiting for more videos.🤚

  • @Dhika653
    @Dhika653 Před rokem +5

    OMG ITS WORKED! Guys it really worked. Thank you maboy

  • @nicoschulz4037
    @nicoschulz4037 Před rokem +15

    Nice video with good explanation. Worked for me even without the source code. Took a while, but it worked.
    Just one quick question: Is there a simple way to add a confirmation to the delete-button before deleting? Thanks in advance.

    • @Kodexx_roy
      @Kodexx_roy Před 11 měsíci

      Hello, can you help me out

  • @faktahati1007
    @faktahati1007 Před rokem

    Nice Course It's worked thank you so much

  • @ChandrajeetPratapSinghCJay

    great tutorial for php mysqli html table !!!

  • @riya_sharma1709
    @riya_sharma1709 Před rokem

    Thank you sir for this video 😊

  • @ashutoshgangwar2665
    @ashutoshgangwar2665 Před rokem

    Thanks for this imp topic that you have covered

  • @mervenwedaye5943
    @mervenwedaye5943 Před rokem +2

    Hello sir, thanks a lot for this good you have done , could I ask you to do the same tutorial with PDO connection to the data-base. Thanks in advance

  • @techwithdenzel
    @techwithdenzel Před 2 lety

    Great tutorial.

  • @sukateknologi159
    @sukateknologi159 Před rokem

    Thnks a lot for your video brow, i can lerning this..

  • @waelzad4655
    @waelzad4655 Před rokem

    Great Example !

  • @virginiasolomon1472
    @virginiasolomon1472 Před rokem

    Wonderful youtube, thank very much!
    I wonder how to add a dialog with 2 buttons for acknowledge to delete the client or not.
    Thank you!

  • @miguelangelperezsantiago783

    Thank you very much Sr.

  • @marcinzale
    @marcinzale Před 7 měsíci

    Very good tutorial.

  • @user-cp4sk7rb3v
    @user-cp4sk7rb3v Před 2 lety

    sir you make great tutorials thank you very much, do you think you could make one on how to make a chrome crypto prices extension or VS code extension? since they seem to be hot topics.

  • @nimijoshy5319
    @nimijoshy5319 Před 5 měsíci

    really very usefull...thank u

  • @HelloWorld-so9uj
    @HelloWorld-so9uj Před 9 měsíci

    Thank you very much❤❤.

  • @nooni213
    @nooni213 Před 7 měsíci

    شكرا استاذ🙏🙏

  • @abdelkadertalbi7063
    @abdelkadertalbi7063 Před rokem

    that was amazing tutorial sir

  • @keepitsimple3645
    @keepitsimple3645 Před rokem

    awasome video thanks very much

  • @kat3586
    @kat3586 Před 3 měsíci

    Best teacher

  • @lucaabg3796
    @lucaabg3796 Před 2 lety

    Best tutorial ☺️☺️

  • @eurryherry1484
    @eurryherry1484 Před rokem

    thank you sir you help me a lot.

  • @trannhan1432
    @trannhan1432 Před 10 měsíci

    Thank you!

  • @shakyxd
    @shakyxd Před rokem

    Thank you so much

  • @anonymous_0717
    @anonymous_0717 Před rokem

    Thank you so much ☺

  • @hsgaming1251
    @hsgaming1251 Před rokem

    bro your language is fantastic

  • @hallatkordo4544
    @hallatkordo4544 Před rokem

    Thank you god bless

  • @AlphaNdiaye-yr4xq
    @AlphaNdiaye-yr4xq Před 5 měsíci

    Thank's you so much

  • @abovethenimbus
    @abovethenimbus Před měsícem +1

    thankyou i can now graduate

  • @khash1163
    @khash1163 Před 7 měsíci

    thank you!

  • @ryoma8801
    @ryoma8801 Před 8 měsíci

    Nice tutorial all works fine on me i solve it in just an hour. But i would appreciate if you added some pop up text when clicking delete button.

  • @xcrud1.7crud13
    @xcrud1.7crud13 Před 20 dny

    Nice!!

  • @Oprekode
    @Oprekode Před rokem

    nice tutorial

  • @vjpadron07
    @vjpadron07 Před rokem

    excelente video muy

  • @cmcotrading
    @cmcotrading Před rokem

    You are amazing my dear... But my question is can i use the same file in a different computer

  • @Henry_Nunez
    @Henry_Nunez Před rokem

    👍🔔 Very good

  • @selsoluis1569
    @selsoluis1569 Před rokem

    Top!

  • @AlphamanKing
    @AlphamanKing Před 5 měsíci

    Great tutorial, although you left out some things and I had to figure and refigure them out myself.

  • @mitarzirojevic2582
    @mitarzirojevic2582 Před rokem

    Hello,
    In 87 line, if loop for executions success Message, i can't see all code for executions. Because of that i have error when i try enter a new user.
    Same thinks is with error message.
    Can you please paste code of success and error message in if loop?
    Thanks

  • @teeyiheng4697
    @teeyiheng4697 Před rokem

    Thank you very much, I have learned a lot.

  • @benedekszabo9121
    @benedekszabo9121 Před 10 měsíci +2

    Almost everything is working correctly, but in the edit and in the delete always write that the id variable is not set to the URL. If i write the id manually to the URL (for example 'localhost/myshop/delete.php?id=1) it's working. Does anyone detected this problem?

  • @shreyas8534
    @shreyas8534 Před rokem

    thankyou for the tutorial
    but can i get the source code for this, its not available in the description box

  • @omarhafez9272
    @omarhafez9272 Před 6 měsíci

    الشكر برشا

  • @mohammedalostath5434
    @mohammedalostath5434 Před rokem

    thanks

  • @BirhalsBR
    @BirhalsBR Před rokem

    Obrigado.

  • @muhammadhusaynamilaiyub6911
    @muhammadhusaynamilaiyub6911 Před 3 měsíci

    sir what do i do if i'm using a foreign key for example each project has different multiple task and i am using foreign key so that whenever i add a task it will get the id of the project then the tasks i added in that project will display but when i edit i want a certain task i have to get the project id and task id how do i do that?

  • @benoittheriault2635
    @benoittheriault2635 Před rokem +4

    Since you are not binding data it’s dangerous for SQL injections. Also, data should be pas into test_input to make sure that injections is also impossible.

  • @JohnMarkDue
    @JohnMarkDue Před 3 měsíci

    do you have a tutorial like this that not using bootstrap? thanks..

  • @user-yi4uq4dx8h
    @user-yi4uq4dx8h Před 4 měsíci

    I clicked on the resubmit form when working on this project the new client form is no longer loading or showing any help

  • @benmakhloufaya5037
    @benmakhloufaya5037 Před 9 měsíci

    merci bcp

  • @mo_zidan7259
    @mo_zidan7259 Před rokem

    can you do that with ajax, I will be grateful if you help with that

  • @waelzad4655
    @waelzad4655 Před rokem

    after applying your example ! , I have Lots of warning errors (Warning: Undefined array key "id") , would you plz, support ?

  • @carrothed760
    @carrothed760 Před rokem +8

    Good tutorial, but would have been nice If we can see the source code, following from just the screen is difficult and confusing.

  • @user-hj5xj6pq5o
    @user-hj5xj6pq5o Před 10 měsíci

    excellent video... do u have any course to buy about php?

  • @marisberzins4895
    @marisberzins4895 Před rokem

    where did u lost SuccessMessage after successfull now client registration ?

  • @FranekMobile
    @FranekMobile Před 2 měsíci

    Hi, How can I be able to delete records, but how can I add an alert that will confirm the deletion, but I don't know how to do it, I've been looking and nothing.

  • @unior2676
    @unior2676 Před 2 lety +1

    Sir can you plz write error message and success message display code here

  • @WebCrafters-yo7ju
    @WebCrafters-yo7ju Před 11 dny

    What would I do if I had radio buttons with the value part already filled

  • @leticiamarianifranca812
    @leticiamarianifranca812 Před 3 měsíci

    MUITO BOM🤙

  • @atienzaivanreint.9818
    @atienzaivanreint.9818 Před 11 měsíci

    Can you help me, the existing data is not showing on edit page

  • @Beastfan_0-i3x
    @Beastfan_0-i3x Před rokem

    i have some issue server saying THIS REQUESTED URL WAS NOT FOUND IN THIS SERVER what shoud i do

  • @zedmedia727
    @zedmedia727 Před 2 lety

    Thank you for making such a great tutorial, it helped me a lot, It is possible to ask you question related to php, are you on instagram?

  • @raevenconsolacion2449

    i donr want to add other files i only want to put all code in one file
    how am i supposed to do that?
    please help me

  • @jakobdylancelestialcordero2329

    SQL QUERY i copied on description error it has !on email same as i delete itPLS help me Tnxs

  • @nadjibdz6838
    @nadjibdz6838 Před rokem

    What if the client who add his own info and admin receive infos in admin panel

  • @ISHAKBOUSHAKISaida-xf8fn
    @ISHAKBOUSHAKISaida-xf8fn Před 2 měsíci

    Excelent video!

  • @yeyestravelbites
    @yeyestravelbites Před 4 měsíci

    Anyone has an idea why I;m getting uncaught exception when adding duplicate email?? Instead of catching the error and showing it as a dismissable warning message?

  • @Laoland
    @Laoland Před rokem

    Where can I get the source code sure?

  • @mal4797
    @mal4797 Před 2 měsíci

    Can the website be opened properly on phones?

  • @yahyadede9133
    @yahyadede9133 Před rokem +2

    i have error in post method
    " Undefined variable $_post in " he said Trying to access array offset on value of type null in C:\xampp\htdocs\xampp\update.php on line 46
    can plz tell me why is that happen

    • @BaukeC
      @BaukeC Před 9 měsíci

      you should use: $_POST['....'] (capitals)

  • @medhabibbenyoussef9391
    @medhabibbenyoussef9391 Před rokem +1

    you didn't show us how we can display the error of duplicating an email which is unique in our data base

  • @arm5379
    @arm5379 Před rokem

    hi, can anyone help? my $connection variable is showing undefined for this - help please

  • @jaws21015
    @jaws21015 Před rokem

    This is very concise but as such it was prone to errors; I spent about a month to troubleshoot this and get it to "work". I was missing end tags and syntax errors as I tried to replicate the process.

    • @lucasferreira8229
      @lucasferreira8229 Před rokem +1

      i'm having the same issue. can you help me?
      in the (edit.php),
      $sql = "UPDATE clients "."SET nome = '$nome', email = '$email', telefone = '$telefone', endereco = '$endereco' "."WHERE id = '$id' ";
      if I remove the ' ' from the $id, it throws an error in this line ( $result = $conection->query($sql); )
      if I let it like this ( WHERE id = $id"; ) it finishes the process, but it doesn't save the data.

    • @alainlado
      @alainlado Před rokem

      ​@@lucasferreira8229tbh, i find it better not to concatenate and just plain write it like echo "sql query code..." Than echo "" . " " . "";

    • @predestined97
      @predestined97 Před 8 měsíci

      @@lucasferreira8229 Hi Lucas. Do you still need help?

  • @viane123456
    @viane123456 Před rokem +4

    Can you share a source code?

  • @maakelolohea2778
    @maakelolohea2778 Před rokem

    A link for the source code would be great thanks

  • @alizanisar6672
    @alizanisar6672 Před rokem

    can i get the source code i followed your video and its giving me the warning erros

  • @alainlado
    @alainlado Před rokem

    I really don't know how you were able to run the invalid query in create.php

  • @Dewnam
    @Dewnam Před rokem

    I entered like 5 rows in teh database but my php only shows one row