First of all, your input fields are text, so it doesn't make sense there. I would write a function for it, so you can simply change the query within it. As an example below here.
Editted after questio in comments
Have you checked with the development tools in google chrome that page? it shows you the lay-out and CSS (part 1, the mark up). and how it's build up. From there on, you can check with what functions you need to use. In your case you need a couple of dropdowns and you need to do some database work.
For instance, say you want to show the RAM memory, and you have a database called models
, make sure you have a partId, partPrice, partName and partType
. For instance, if you have RAM, and it's a RAM memory part, say you assign the value 1
to it. In your case your query of the dropdown would be (as I explained above)
function LoadRAMParts(){
$query = "SELECT *
FROM models
WHERE partType = '1';
ORDER BY partName DESC;";
$resultaat=mysqli_query($query);
return $resultaat;
}
So you get returned all your RAM Memory parts now, which you can now just simply load into your dropdown menu by using a bit of PHP
function MakeRAMMemoryDropDown(){ // define name of the php function and open the function
echo "<select name='RAMPartId' class='dropdown'>"; // open the dropdown with the name RAMPPartId
$results = LoadRAMParts(); // Load in the query from earlier
while($row = mysqli_fetch_array($results)){ // while lets it loop through your results as long as there are results
echo "<option value='".$row['partId']."'>" // the value for the ID when it's chosen
.$row['partName']."</option>"; // the name of the product the user sees
} // end of the loop
echo "</select>"; // end of the dropdown
} // end of the php function
This you exectue in a seperate file that you include on the top. (I run first my queries first, then create the dropdowns, else it becomes a conflict, because the function i call within my dropdown function has to excist, prior to the dropdown. For me it looks like this.
So as final part, and I hope i explained it to you a bit, you need to call in the function into your PHP page where you want to use it. That just goes simply by the code:
<?php MakeRAMMemoryDropDown() ?>
As example:
And thats called dynamicly loading in your content. Now I use a different type of code placement and different ideas of generating contenct, but to each programmer it's own style. This is how I load in my content.
As for your loading prices question, you have to that with AJAX (Asynchronous JavaScript And XML) but thats not my cup of tea, I cant help you there. Sorry.
I hope I explained it to you, if not, I hope you figure it out another way then.