<?php
        // where is your config file stored?
	include ("config.php");
	$bus1= htmlspecialchars(trim($_POST['bus1']));
	$bus2 = htmlspecialchars(trim($_POST['bus2']));
	if(isset($_POST['bus1'])&&isset($_POST['bus2']))
	{
		$changebus1  ='update stop set BusNumber="'.$bus1.'##"where BusNumber="'.$bus1.'"';
		mysql_query($changebus1) or die(mysql_error());
		$changebus2  ='update stop set BusNumber="'.$bus1.'"where BusNumber="'.$bus2.'"';
		mysql_query($changebus2) or die(mysql_error());
		$interchange ='update stop set BusNumber="'.$bus2.'"where BusNumber="'.$bus1.'##"';
		mysql_query($interchange) or die(mysql_error());	
	//	echo $changebus1."<br>".$changebus2."<br>".$interchange;
		echo "yes";
	}
	else
	{
		echo "no";
	}
?>