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

Поділитися
Вставка
  • Опубліковано 9 лис 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.

  • @rizzeaux
    @rizzeaux 11 місяців тому

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

  • @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.

  • @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...

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

    Perfect tut, great work Big Raj

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

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

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

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

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

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

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

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

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

    Waw, I really appreciated it! Thank you Raj Bhise

  • @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

  • @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

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

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

  •  Рік тому

    Thank you

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

    Thank you very much Brother

  • @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!!

  • @Chetan-k2p
    @Chetan-k2p 8 місяців тому

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

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

    Thankyousomuch sir!

  • @vikaskumar-o5s9u
    @vikaskumar-o5s9u Рік тому

    really helpful brother.. god bless you.

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

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

  • @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.

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

    sir great video. Thank you sir

  • @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.

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

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

  • @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?

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

    Fantastic !!!!!!!

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

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

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

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

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

    Thanks

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

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

  • @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

  • @mohamedhassan-bc3ui
    @mohamedhassan-bc3ui 2 роки тому

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

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

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

  • @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

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

    how do we edit the displayed data?

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

    Perfect!

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

    can you please show how to add pagination on this code

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

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

  • @VaibhavYawalkar
    @VaibhavYawalkar 11 місяців тому

    how to show data in input field already on page ?

  • @RajanSharma-jh6gd
    @RajanSharma-jh6gd 2 роки тому

    how to do same thing in laravel??

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

    hi, nice job... source code?

  • @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 😰

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

    I am facing some problem can i share with you

  • @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.

  • @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...

  • @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 ??

  • @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 роки тому

      ua-cam.com/video/29pVT2UoC6g/v-deo.html Check with this...it may be helpful...

  • @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'] : '');

  • @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"

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

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