Exemple #1
0
<?php

include "../templates/header_session.php";
include "../templates/header.php";
//including classses
include '../classes/CafeDetails.php';
//creating objects
$cafe_details = new CafeDetails();
$msg = NULL;
if ($_POST['submit']) {
    $state_name = $_POST['state'];
    $city_name = $_POST['city'];
    $result = $cafe_details->setCity($state_name, $city_name);
    if ($result) {
        $msg = 'city has been submitted';
    }
}
?>
<script language="javascript" type="text/javascript">
function getXMLHTTP() { 
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");