my code works fine but i feel i my structure of this code is not good. can any one help me out? i puted all code in one page.
so i have a page. this page is made up by 3 parts. 1st part is the header. in header i am connecting to database. 2nd part is the form. in form i have a html select. where user can pick "price: heigh to low", "price: low to heigh". 3rd part is where i am display the items. each item has a price. so if user pick "price: heigh to low" than height price item will be at top and low item will be at bottom.
You need to learn ajax request, html page sends request to server on any event with parameters, there on server you must have some script to handle such request , the script will return you some output, that you can reflect on html page,
all this will not need to reload whole page, only part of page is updated.