Fastest Web Hosting

could you help me fetch records from a mysql table using two dropdown on webpage

0 votes
asked Jul 6, 2016 in PHP by rohit (2,750 points)

I am creating a webpage where user can track his order courier status by just select two values name and date

My Cms is automatically saved courier track order in database table. Simply i want to fetch that result on based selected two values from dropdown ..

1 Answer

0 votes
answered Jul 6, 2016 by rajatinsa (3,350 points)

You can develop it via two method
1 : Via Ajax
2 : Submit form

I am explaying you ajax based search on based by name..You will have to add name dynamically via sql or etc.

if($_POS['name'] !='')
  /*fetch & print record from table via sql or just print and don't forget die() function before } closing bracket of if condition*/

<script src=""></script>
    			var name = $('name').val();
    			var date= $('date').val();
    			var datastring='name='+name+'&date='+date;
    			type: "POST",
    			url: "serverfile.php",
    			data: datastring,
    			cache: false,
    			success: function(ht){
    			return false;

<select id="name"><option>Name 1</option><option>Name 2</option></select>

<div id="result"></div>

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's