PHP Ajax CRUD Application Tutorial - MySQL & Bootstrap & jQuery DataTables [Part 3]

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

КОМЕНТАРІ • 93

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

    It worked! CRUD completed. thank you so much Senaid!

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

    Nice Tutorial Senaid. I was looking for a cleaner, admin section with adding news or whatever... This is the cleanest i ever saw, so far.. THX!!

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

      Awesome, I am so happy that I could help you. Thank you for support!

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

    thank you for this learning video, i feel this video really helped me to understand ajax, jquery, mysql and bootstrap. may God increase your knowledge

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

    Thanks! This is very helpful. Hope you make more vid tutorials! So useful for me and the fact that the source code is available is awesome! 👌👌

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

    Thankyou for the video, helped me for school.

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

    Senaid You're awesome! The way you proceed , the way you explain stuff never missing out any details or functionality is unmatched and quite helpful for beginners like me. Keep Up the Good work mate! :)
    I'm working on a college project and i'm using your model for the same i was wondering if i could add save as pdf button on clicking view button along side the close button. i know how to add the button as you showed by adding and fading it out on the other menus but how do i link the functions to onclickaction of that button. i'm trying to achieve it by tho but if i could get a bit of help that would be great.

  • @_m.a-x
    @_m.a-x 6 років тому +1

    What a wonderful work, Senaid! Your pace and continuity are simply amazing! At first I thought it was scripted with cheat sheets (which is ok), but sir, seeing how you pick your choices and build as you go, that is so impressive.
    I loved your tutorial and I am using it as a reference for my project. If you don't mind I wanted to ask you for just a guidance, not a ready solution on a plate... What would be your take on reusing this code for managing multiple tables of different size? I would hate to create a duplicate copy for each table, and instead try to reuse its functionality. Do you have any suggestions for me? I just need the approach and general cornerstone ideas. As for the rest I will do my research and find details "how to". Or maybe there is another tutorial that covers how to reuse functions and the recommended "architecture" - what to place where and how to tie everything in together. Something that I could use as inspiration and combine with this tutorial? Thank you sir and much much respect!

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

      Thank you so much! :)
      Well, it's very hard to explain it in the comment, so I have written in my notes to create a tutorial about that. Basically, what you're looking to do is to create a function (in procedural) or class (in OOP) that will be like a template for what you're going to do in one table. From there that template will basically depending on the inputs generate a different result, but same in design.

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

    Thank you very much for your helpful video. I have a question like that: "How can the table always show 10 rows when i deleted one of them?".

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

    Hi Senaid, Great tutorials once again! You are such a kind person for sharing your knowledge with us. I wanted to ask if you can create additional data entries that handle images too? It just handles all text data. Thank you :)

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

      Yes, for sure, I will think about the tutorial that will covert that too. :)

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

      Cant wait! Thanks, Senaid ;)

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

    Hi, Senaid. Is it possible to do datatables with postgresql also? I was trying to implement it but I was not able to get the limit query to work and the result I get is "No data available in table"

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

    Senaid thanks for the great video. One question, you are deleting row from the Datatable , so it is not sending Ajax query to the MySql , refreshing and showing "real situation". Let me explain, when you delete table row, you don't have any more 10 entries, but 9, and deleting next one will leave us with 8, this issue will be much more visible if you have striped rows, one white, and underneath one gray, so, if you delete 2nd row, you will have 2 white next to each other, and that doesn't look nice. Any idea, update?

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

      Thank you for the amazing feedback! It's great when viewers asking those questions! In order to fix that problem, in the deleteRow() function, just after I delete the row, you can add the line:
      $("#tableManager").draw();
      This line will "refresh" the data in the table, and on that way fix the problem that you mentioned above.

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

    sir thank you so much you've really help me with my project in school thank you .

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

      Glad I could help!

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

      @@SenaidBacinovic sir i have a poblem when i add or delete some data the ajax is not working it needs to be refresh the page how can i fix that?
      thank you

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

    Really amazing something i have been for a while now. Thanks man :)

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

    Great tutorial thankyou very much

  • @_m.a-x
    @_m.a-x 6 років тому +1

    Hi Senaid again, it looks like the draw() solution you suggested earlier does not work. Do you have another tip? I am trying to achieve table reload/refresh for both, deleteRow() and manageData() for update and add.
    Right now Add New will not refresh the table with the new entry. Also, I figured that $("#cat_"+editRowID.val()).html(name.val()); for Edit option is more of a workaround just for the Country field only.
    DeleteRow() needs the refresh too, because it doesnt update the "Showing 1 to 10 of XXX entries". XXX stays the same and doesn't decrease. I think that a complete reload can help all options: add, edit and delete.
    Please help!!

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

      It should work. Can you show me the code?

    • @_m.a-x
      @_m.a-x 6 років тому

      Hi Senaid, thanks for the reply. I copied your code over 1:1 and removed all my code that I build on top of your source. This way I excluded all potential issues with versioning and other factors. For example I am loading Bootstrap 4 sources and respective DataTables in my code, but for the sake of experiment I removed everything, only leaving your files. The only alteration was provide root password in ajax.php and add the suggested line as shown below:
      =========================
      function deleteRow(rowID) {
      if (confirm('Are you sure??')) {
      $.ajax({
      url: 'ajax.php',
      method: 'POST',
      dataType: 'text',
      data: {
      key: 'deleteRow',
      rowID: rowID
      }, success: function (response) {
      $("#country_"+rowID).parent().remove();
      alert(response);
      }
      });
      $("#tableManager").draw();
      }
      }
      =========================
      I tried moving the line outside $.ajax() and inside, right after and before the alert(), but no luck. The table is not redrawn.

    • @_m.a-x
      @_m.a-x 6 років тому

      Hi Senaid again, I have an update. I started studying the documentationon DataTables and intuitively tried to use this line of code:
      $(".table").DataTable().row().remove().draw();
      It works but not really. The page is redrawn but it's always the first row that is being deleted from the table, regardless of which one I choose to delete.
      What are your thought about this method overall?
      Thanks again!!!!

    • @_m.a-x
      @_m.a-x 6 років тому

      I am trying to employ this: datatables.net/reference/api/ajax.reload()
      But failing miserably =((. Th function fails, says It wants an JSON response from server to run. That's as far as I could get but now I am stuck. I like the ajax.reload because it is universal and I am thinking it could be implemented with Add and Update events too.

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

      Any news?

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

    Another good video.
    Thumbs up!

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

    I got a crud part 1 and crud part 3. Is there a crud part 2? I go to the second video go through the download process and get directed to crud part 1 not part 2.

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

    how to add category search also

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

    when i am trying to add new record model title is showing name of country from previous record. How i can make it correct?

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

    i used your code in my project.it's working fine. but it not show search option and pagination.how can i fix this error? can you help me?

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

    So amazing
    Many thanks man

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

    Thank you so much sir.

  • @JonSnow-zc6yr
    @JonSnow-zc6yr 4 роки тому

    How to reload datatable after success: function() without using window.location.reload()?

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

    Hi i just want to ask why is my new append row table disappearing whenever i click the desc asc function of datatable? how do i prevent it?

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

      Here is a nice example of how you can achieve it: datatables.net/examples/api/add_row.html
      If you don't understand something, let me know. :)

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

      thanks sir!! just found that you can't add id on td in this method of add row..

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

    When I add the delete function, add new function does not work. How can I solve this ?

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

    Hi senaid. I just found a bug recently. I dont know if its only my problem. but whenever i click edit first then I click the add new it retains some info about the edited module. can you help me?

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

      Hmm, have you watched this video till the end? I can't remember the exact time, but somewhere in this video, I will fix that bug(if I remember correctly). :)

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

      yes i did. i have finished it. everything went smoothly but i noticed the bug when i dont hit refresh when I click the add button after hitting edit button. can you help me? Great Tutorial btw. ;)

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

      I just fixed it.. i kinda missed something in the video. Thanks for the help!!!!

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

      Amazing, glad you made it! :)

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

      I am not able to catch the solution, please explain

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

    When i'm adding nes record it doesn't add to the data table. What is the problem?

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

    Excelent Series... Thanks...

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

    There's a little bug, at the end of the video, when we remove the parent (row) of country_id it stays in the memory of DataTable (I guess) and when I search on the specific input field, it shows again the row deleted even if we removed it. Same issue when we create a new Country, doesn't update... we have to find out a way to refetch asynchronously all the table rows, any idea? :)

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

      For everyone having the same issue, simply use this in the callback $(".table").DataTable().row($("#country_"+rowID).parent()).remove().draw(); to update the table after deleting the row. Now I'm trying to figure out how to update the table when we create a new country

  • @mdhabib-xf1dc
    @mdhabib-xf1dc 7 років тому +1

    thank you so mcuch for help dear sir

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

      Awesome, I am so happy that I could help you. Thank you for support!

    • @mdhabib-xf1dc
      @mdhabib-xf1dc 7 років тому +1

      ur always welcome dear you are great

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

    Shout out to you buddy.! your tutorial awesome. Pls, let me know if you have other complete series of programming course in "udemy.com".

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

      Thank you Sebastian. I don't have on udemy, but I have it here: www.cpicoach.com/accelerator :)

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

    hi, excelent but how we can add an excel export button. thanks

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

      Alejandro Pereira I will record a tutorial to show you how to do it.

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

      Coding Passive Income really. When? I will apreciated. Thanks

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

      Alejandro Pereira probably in the next few days

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

      Coding Passive Income perfect. Thanks

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

    Hi, when I open your code on the web the code keeps adding new IDs:'.$data["id"]. and country names: .$data["countryName"].'. Any help ?

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

      Hmm, I am not sure what is the problem. Can you show me the picture?

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

      Hello, i've been having the same issue. Were you able to resolve it? How? Thanks

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

    need a site. Interested?

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

      Hey James, please use my contact form and we can go from there: codingpassiveincome.com/contact

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

    Where is the source code? The link above just brings me to your website.

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

      Yes, and once you're there at the right side there is blue button "Download Source Code" :)

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

      Found it! Had to disable adblocker :) Thank you sir!

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

      Amazing, glad you made it! :)

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

    download link not working. thumb down :|

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

      Hmm, are you sure? I have just tested and it does work without any problem. What exactly is happening on your side?

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

      Coding Passive Income clicking ..... Nothing happens....

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

      Have you received any message from CodingPassiveIncome to your Facebook messenger?

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

    Sorry, I don't get any link for downloading source code from you, please correct it sir.
    •Reply•Share ›

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

      Can you reply to that email?

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

      Dear Sir ,,, the link you share in description,,, whenever i click it will redirect me to your website and from your website whenever i click for download source code it shows me a message to check my email for download source code,,, but when i check my mail i don't find any kind of link,,, please provide me the part 3 tutorial source code or any link to download source code,,,, thank you so much for sharing your knowledge...

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

      Thank you so much... Finaly i got it.

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

      Awesome :D

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

    no email link download send to me

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

      Have you got an email? If you did, please just reply to that email and I will send you a download link.

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

      I have not received an email yet. this is my email fahri.halid@gmail.com thanks before

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

      I have just sent you a download link for entire CRUD system. :)

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

    Brother please give you skype pr facebook