I have attached 3 .php files and 1 .html file which is the index page along with this README file.
I have my code running in my private server. You can check the execution at: http://pdilip.com/lcc6313/ex1.html
If you would like to see the database tables, go to: http://web84.webfaction.com/static/phpMyAdmin/
username : pdilip_lcc
password : 331c03fc
Once you login, you will be able to access pdilip_lcc database which has 4 tables. Cars table is used for Question 2 and the remaining 3 tables were used for Question 3.
I have checked the working of all 3 and they seem to work seamlessly. If you have any questions, please email me at : dilip3@gatech.edu
Thank you.