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

	// CLIENT INFORMATION
    //$rows = array();
	//$addClient= htmlspecialchars(trim($_POST['myValue'])); 
	//print_r($_POST);
	$stopname=htmlspecialchars(trim($_POST['stopname']));
	$query='select BusNumber from stop where StopName="'.$stopname.'"';
	$result = mysql_query($query) or die(mysql_error());
	;
	$row = mysql_fetch_array($result);
    	//printf("ID: %s  Name: %s", $row[0], $row[1]);  
		//$test=$row[1];
   if(mysql_num_rows($result)>0)
   {
      echo $row[0];
   }
   else
   {
     echo "error" ;
   }
	
 
	//return($rows);
?>
