I have a php file that contains switch/case which is in JSON I believe.
Please excuse me on my knowledge of php/ajax/json, really trying to learn this.
<?php
switch($_GET['make']) {
case "Acura":
echo json_encode(array("MDX","RDX","RL","TL","TSX","ZDX"));
return;
case "Audi":
echo json_encode(array("A3","A4","A5","A6","A8","Q5","Q7","R8","S4","S5","S6","TT","TTS"));
return;
}
?>
This is the file I have, it has all makes/models. How would I go about creating a drop downlist that shows all makes,”Acura,”Audi”, then have a second dropdown that would populate with models. If I selected Acura, the second dropbox would show MDX, RDX, RL, TL, TSX, ZDX
http://whodateswhere.com/auto/
I have the dev site set-up here but it’s not functional. How would I be able to make it work on my site?
Thanks for your help!
1 Answer