<?php
        // where is your config file stored?
	include ("config.php");

	
	
	if(!($_POST['BusNumber']==""||$_POST['StopName']==""||$_POST['StopNo']==""))
	{
		$BusNumber = htmlspecialchars(trim($_POST['BusNumber']));
		$StopName = htmlspecialchars(trim($_POST['StopName']));
		$StopNo = htmlspecialchars(trim($_POST['StopNo']));
		$ans='select * from stop where StopNumber="'.$StopNo.'"and BusNumber="'.$BusNumber.'"';
		//echo $ans;
		if(mysql_num_rows(mysql_query($ans))>0)
        {
	    	  echo "yes"; //Stop Number all ready exists for the bus
			//  print_r($_POST);
	    }
		else
		{
		 //print_r($_POST);
	      echo "no"; //Details Added
		  $addClient  = "INSERT INTO stop(StopNumber,StopName,BusNumber) VALUES ('$StopNo','$StopName','$BusNumber')";
          mysql_query($addClient);// or die(mysql_error());
       	}
		//echo $ans;
	}


?>