JavaScript PHP POST for HTML Select using another POST post html select value,html post select,html post select

This ain't something not working but just I'm confusing about how to do it, I want to fetch the values from my DB based on users' preferences that been chosen earlier. These are the steps will be taken for my process:

  1. User will select from images (will add HTML images then will whip it upon another selection)
  2. Will continue till reaching last stage
  3. Last stage will have 3 Select (dropdown menus) and 2 of them will change the content according to what user's chooses (like country and state dd)

My PHP:

else if ($_POST["data_key"]=="last")
{   
    $final_arr;
    $fetcher_theme =    $_POST["themeid"];
    $fetcher_category=  $_POST["themecategory"];
    $fetcher_product=   $_POST["themeproduct"];
    $fetcher_cover =    $_POST["ctitle"];

    $myquery="SELECT DISTINCT Layout.* FROM Layout,Products,Occasion, Cover, Theme 
    WHERE Layout.product=$fetcher_product 
    AND Layout.occasion=$fetcher_category 
    AND Layout.theme=$fetcher_theme 
    AND Layout.cover=$fetcher_cover;";


    $results=$DB->fetchAll($myquery);

      foreach ($results as $row) {
        $row["current"]="size";
        unset($row["pixfizzId"]);
        $final_arr[]=$row;
            }

    echo json_encode($final_arr);
}


    else if ($_POST["data_key"]=="size")
{   
    $final_arr;
    $fetcher =           $_POST["selected_id"];
    $fetcher_theme =     $_POST["themeid"];
    $fetcher_category=   $_POST["themecategory"];
    $fetcher_product=    $_POST["themeproduct"];
    $fetcher_cover =     $_POST["ctitle"];
    $fetcher_size =      $_POST["stitle"];

    $myquery="SELECT DISTINCT Size.stitle FROM Layout,Products,Occasion, Size, Theme 
    WHERE Layout.product=$fetcher_product
    AND Layout.occasion=$fetcher_category
    AND Layout.theme=$fetcher_theme 
    AND Layout.size=$fetcher_size
    AND Layout.size=Size.id";

    $results=$DB->fetchAll($myquery);

      foreach ($results as $row) {
        $row["current"]="finishing";
        unset($row["pixfizzId"]);
        $final_arr[]=$row;
            }

    echo json_encode($final_arr);
}

        else if ($_POST["data_key"]=="finishing")
{   
    $final_arr;
    $fetcher =           $_POST["selected_id"];
    $fetcher_theme =     $_POST["themeid"];
    $fetcher_category=   $_POST["themecategory"];
    $fetcher_product=    $_POST["themeproduct"];
    $fetcher_cover =     $_POST["ctitle"];
    $fetcher_size =      $_POST["stitle"];
    $fetcher_finishing = $_POST["ftitle"];

    $myquery="SELECT DISTINCT Finishing.ftitle FROM Layout,Products,Occasion, Size, Cover, finishing, Theme 
    WHERE Layout.product=$fetcher_product 
    AND Layout.occasion=$fetcher_category 
    AND Layout.theme=$fetcher_theme 
    AND Layout.size=$fetcher_size 
    AND Layout.cover=$fetcher_cover 
    AND Layout.finishing=$fetcher_finishing";

    $results=$DB->fetchAll($myquery);

      foreach ($results as $row) {
        $row["current"]="finishing";
        unset($row["pixfizzId"]);
        $final_arr[]=$row;
            }

    echo json_encode($final_arr);
}}

My Engine JS (what I assign):

         myItem.setId(jsonData[i].id);
         myItem.setImg(jsonData[i].image);
         myItem.setTitle(jsonData[i].title);

My Selects in JS (printing HTML):

myString +="<a>Sizes: </a><br><select id='sizesSelect' style=' width:200px'></select><br><br>";
    myString +="<a>Cover: </a><br><select id='coverSelect' style=' width:200px'><br></select><br><br>";
    myString +="<a>Finishing: </a><br><select id='finishingSelect' style=' width:200px'></select><br><br><br>";

Appending to Select in JS:

myString +="<script>$('#sizesSelect').append('<option val="+i+">"+this.getSize()+"</option>')</script>";

Now I need to know how can I post again to my PHP server to fetch the the values to other selects (refer for the img).enter image description here

Select Size -> Update Covers -> Select Covers -> Update Finishing -> Select Finishing

Answer:1

I'm working on a VOIP application using node js and webrtc. I'm having a problem with microphone being denied on start by chrome when I change IP from localhost to 192.168..... When I start my ...

I'm working on a VOIP application using node js and webrtc. I'm having a problem with microphone being denied on start by chrome when I change IP from localhost to 192.168..... When I start my ...

  1. chrome microphone permissions
  2. chrome microphone permission error
  3. chrome extension microphone permission
  4. google chrome microphone permission
  5. ios chrome microphone permission
  6. chrome add microphone permission
  7. chrome not asking for microphone permission

I made a Morris.js graph: http://thuis.xitro.nl/ I do not want to set a value in ymin, I have this on "auto". I now have very long numbers because of that, example: 55.29999999999999 I want that to ...

I made a Morris.js graph: http://thuis.xitro.nl/ I do not want to set a value in ymin, I have this on "auto". I now have very long numbers because of that, example: 55.29999999999999 I want that to ...

I am working on a code to get a JSON value from javascript to my JSP. The JSON value is a boolean, so I could use if/else in my JSP script. I have two javascript files and a JSP. Widget.js ...

I am working on a code to get a JSON value from javascript to my JSP. The JSON value is a boolean, so I could use if/else in my JSP script. I have two javascript files and a JSP. Widget.js ...

  1. pass json value in javascript
  2. pass json value as string
  3. pass json value in url
  4. pass json value in c#
  5. pass json value
  6. json pass value to controller
  7. how to pass json value in postman
  8. json pass null value
  9. how to pass json value in ajax
  10. json pass boolean value
  11. how to pass json value in php
  12. how to pass json value in java
  13. how to pass json value in angular
  14. pass date value json

since yesterday i started javascript to make a hovering effect that applys to the body of the page(i want to change the background color of the body of the page while hovering a div), I've watched ...

since yesterday i started javascript to make a hovering effect that applys to the body of the page(i want to change the background color of the body of the page while hovering a div), I've watched ...

  1. javascript mouseover event
  2. javascript mouseover mouseout
  3. javascript mouseover tooltip
  4. javascript mouseover event listener
  5. javascript mouseover vs mouseenter
  6. javascript mouseover vs hover
  7. javascript mouseover effects
  8. javascript mouseover not working
  9. javascript mouseover selenium
  10. javascript mouseover highlight
  11. javascript mouseover class
  12. javascript mouseover image change
  13. javascript mouseover change color
  14. javascript mouseover show tooltip
  15. javascript mouseover child element
  16. javascript mouseover text box
  17. javascript mouseover image
  18. javascript mouseover element
  19. javascript mouseover div
  20. javascript mouseover show div