Select from Drop-down list and display MySQL data on PHP page using AJAX query.

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

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

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

    Raj you are a genius sir. I'm working on a project and this was exactly what I was looking for.

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

    Exactly what I was looking for. Thank you so much Raj!!!

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

    Great work. It is very helpful and step by step explanation made it easy to understand. Thank you.

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

    Great video. I actually made it work on the first try! The only thing that would be nice is explanation on where the content goes if it's not inside a table.

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

    Perfect tut, great work Big Raj

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

    IT Finally Worksss !!!1 Thank YOU!!! ❤❤❤

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

    Good job !
    But today is Better to code with PDO. In fact, and you know that, the code can be swift between different system, and not only MySQL.
    Would you, for your next code to be published, do that with PDO. !!! Not only for me, but for all coder how are looking for some PHP code !!!
    Cheers...

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

    What if I want to show more tables and drop downs on the side?

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

    Thank you, sir. I appreciate slower pace so that also beginners can keep up with it.

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

    Thank you so much for this great video.
    But how if I want to add information for the second mobile without removing the information for the first mobile? ... means I have to add a dynamic table row..
    Can you help me with this please?information

  • @rizzeaux
    @rizzeaux 11 месяцев назад

    Thanks! This helped me to customize a crucial and difficult piece of my program. This is a great instructional video.

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

    Your actually the goat, This helped so much thank you.

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

    very useful becuse of this i resolve my issue very easly thank uhh

  • @Chetan-k2p
    @Chetan-k2p 8 месяцев назад

    It would be good if you provide github repo link of such codes in the description of your videos.

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

    Waw, I really appreciated it! Thank you Raj Bhise

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

    thank you for the Video, but how I can add Select all to dropdown list?

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

    Great tutorial, I would like to leave this suggestion for all who is going to implement this fantastic tutorial. Remove echo $sql at 29:25 and use $k = ( isset ( $_POST[ 'id' ] ) ? $_POST[ 'id' ] : '' ); at 24:09

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

    Really helpful video. Is it possible to display the data in a text field instead of creating a table? I am looking to select a specific id from the database and display only the corresponding product name. Thanks in advance for any help.

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

    hi , thank you for this tutorial, i have just one question: is it posible to select one of the output rows and add it into a form?

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

      Hello! Were you able to solve this problem? I am having the same one

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

      Yes it is. Will share the link soon.

  • @vikaskumar-o5s9u
    @vikaskumar-o5s9u Год назад

    really helpful brother.. god bless you.

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

    tried the same code but mine does not display results when searched

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

    Thank you very much for this tutorial, i have a question about if i want to pass the ajax response call data to another PHP file is it possible i tried sessions but it didn't work e.g $_SESSION[something] = $row[something]; (it didn't work) is there any other way to pass the data!!

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

    Bro it's not working ..
    I write "echo $sql" in the end but the problem that happened to you stayed with me ...
    Give me solution pleease

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

    How to do the same thing with a "Sidebar" or a "Navbar" instead of dropdown list..... Please Help !!

  • @VaibhavYawalkar
    @VaibhavYawalkar 11 месяцев назад

    how to show data in input field already on page ?

  • @mohamedhassan-bc3ui
    @mohamedhassan-bc3ui 2 года назад

    nice bro but can i contact with u cuz i have a problem in my code

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

    It works great, but only one time. If I try to select from the dropdown and it crashes. If I refresh the page 2 or 3 times, it works.
    Is there a way to clear the cache after a selection?

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

    Sir i want to fetch particular data under select tag which are stored in different tables...Please help me out

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

    Hi, may i know why is twice? thanks in advance

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

    how can we use database tables as options in dropdown menu to insert data in selected table....?

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

    Thank you very much Brother

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

    if I were to add a filter for the model and show the data related to the filter, what should I do?

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

    can you please show how to add pagination on this code

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

    Amazing! I got it to work for me! THANKS!

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

    What if I want to show data with 5 drop-down list

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

    sir great video. Thank you sir

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

    Thank you so much, man! It helped me a lot😊

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

    I tried this code but
    echo $sql the output is SELECT * FROM students WHERE sec_id = *
    I really need this kind of code for my capstone project can you help me? I can't display data 😰

  •  Год назад

    Thank you

  • @RajanSharma-jh6gd
    @RajanSharma-jh6gd 2 года назад

    how to do same thing in laravel??

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

    Thankyousomuch sir!

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

    hi, nice job... source code?

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

    how do we edit the displayed data?

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

    Fantastic !!!!!!!

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

    Hi There, Thank you for the tutorial. I have used it in WordPress to develop a plugin and I am experiencing small issue with CORS: I am getting the following error Access to XMLHttpRequest at '' from origin ': Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    When I use the CORS extension on my browser and disable it (CORS) works but only on my browser: Could you please help me resolve this issue.

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

      hi sir had you succed to develop your plug in ? seems there is no such plug in (as i know ), if it is , could you share it please ? i need it, just answer me even you don;t want to share thank you

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

    Thanks

  • @9superslick
    @9superslick 2 года назад

    I keep getting Failed to load resource: the server responded with a status of 500 () after selecting an option in the dropdown

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

      check if you have installed php-mysql connector...

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

    Data not display without showing any error. How?

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

      Enable error reporting by adding the following code:
      ini_set('display_errors',1);
      Preferably at the start of the page. It will display the error, if any.

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

    Perfect!

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

    I am facing some problem can i share with you

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

    Awesome tutorial! I'm trying to do this with boxes though and I can't find a tutorial online _anywhere_ that shows how to do that. I'm looking and asking everywhere for help, so I'm asking for help with it here too. I asked on StackOverflow but some asshole commented "you're doing javascript, not database." and shut my question down (closed it) although there's ZERO javascript in the code I shared and I didn't type the word database even once in my question or title text. The question wasn't even posted for an hour and got zero answers or (helpful) comments.
    F%*K Stackoverflow!

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

      ruclips.net/video/29pVT2UoC6g/видео.html Check with this...it may be helpful...

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

    Urgent Urgent!!!!!- Excellent but i got an error msg "Warning: Undefined array key "id" in D:\xampp\htdocs\lesson\lesson1\showdata.php on line 2"

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

    Thanks for the tutorial. I had the dropdown list populating but now am getting an error related to the page you called showBrand. As you did I also echoed out the sql statement and it is breaking it because it does not recognise the $k variable.
    $k = $_POST['id']; // line 3
    $k = trim($k);
    $con = mysqli_connect("localhost", "root", "password", "oct2020project");
    $sql = "SELECT * FROM links WHERE subject='{$k}`";
    echo $sql;
    The output from the echo is
    SELECT * FROM links WHERE subject='`
    This is happening because I am getting
    Notice: Undefined index: id in C:\xampp\htdocs\dependantdropdown2021\dependantdropdown\showlinks.php on line 3
    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\dependantdropdown2021\dependantdropdown\showlinks.php on line 13
    while($rows = mysqli_fetch_array($res)){ ?> //Line 13
    I am using a table called links. Where you used brand I used subject.

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

      PLEASE USE $id = (isset($_POST['id']) ? $_POST['id'] : '');

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

    Bro it's not working for 2 selector combobox

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

      can you clarify 2 selector combobox

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

      @@rajbhise8586
      I mean how to use 2 two drop-down list ??