dinesh.4126
31st July 2009, 08:34
Hi,
I am beginer in PHP,HTML.We have deisgn a web in php for google map display+weather information with multi-language options.We want page to refresh ,if person enter weather data in msql server it will keep on refershing the webpage so that it will show updated information on page.Kindly help me what are additional things neede to added in code so that keep on refreshing the page after certain time duration.
Below are code .php file :
-----------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Remote Weather Monitoring</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAZp4rKdeeazZBQ3EH922U UBTIorwmHn2vzvETmozy_EzYqHAPGRRS5FVIpoR9KihjOtSDuH wlbGw8LA"
type="text/javascript"></script>
<?php
include_once("include_files_map.php");
include_once(PATH_TO_MAIN_PHYSICAL_LANGUAGE.$langu age.'/'.FILENAME_INDEX);
include_once(FILENAME_BODY);
//print_r($_POST);
if($_POST['language'])
{
switch($_POST['language'])
{
case 'oriya':
define('TEXT_LANGUAGE','or_');
break;
case 'hindi':
define('TEXT_LANGUAGE','hi_');
break;
case 'tamil':
define('TEXT_LANGUAGE','ta_');
break;
case 'telugu':
define('TEXT_LANGUAGE','te_');
break;
case 'bengali':
define('TEXT_LANGUAGE','be_');
break;
case 'kanada':
define('TEXT_LANGUAGE','ka_');
break;
default :
define('TEXT_LANGUAGE','');
break;
}
}
$search_location_name=$_POST['TR_name'];
$display_size=$_POST['size_of_display'];
$map_type=$_POST['type_of_map'];
//getting from data base
$data=getAnyTableWhereData(LOCATION_TABLE,"name='".$search_location_name."'","*");
$location_name=$data['name'];
$latitude=$data['lat'];
$langitude=$data['lng'];
$weather=$data['weather'];
$temp=$data['weatherinfo_temp'];
$humidity=$data['weatherinfo_humidity'];
$distance_from=$data['distance_from'];
$distance_to=$data['distance_to'];
$depth_from=$data['depth_from'];
$depth_to=$data['depth_to'];
// $fish_info=$data['fish_info'];
$warning=get_name_from_table(WARNING_TABLE,TEXT_LA NGUAGE.'warning','id',$data['weatherinfo_warning']);
//echo aaa;
//die();
$wind_direction_from=$data['wind_direction_from'];
-
-
-
-
-----------------------------------------------------------------------------------------------------
I am beginer in PHP,HTML.We have deisgn a web in php for google map display+weather information with multi-language options.We want page to refresh ,if person enter weather data in msql server it will keep on refershing the webpage so that it will show updated information on page.Kindly help me what are additional things neede to added in code so that keep on refreshing the page after certain time duration.
Below are code .php file :
-----------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Remote Weather Monitoring</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAZp4rKdeeazZBQ3EH922U UBTIorwmHn2vzvETmozy_EzYqHAPGRRS5FVIpoR9KihjOtSDuH wlbGw8LA"
type="text/javascript"></script>
<?php
include_once("include_files_map.php");
include_once(PATH_TO_MAIN_PHYSICAL_LANGUAGE.$langu age.'/'.FILENAME_INDEX);
include_once(FILENAME_BODY);
//print_r($_POST);
if($_POST['language'])
{
switch($_POST['language'])
{
case 'oriya':
define('TEXT_LANGUAGE','or_');
break;
case 'hindi':
define('TEXT_LANGUAGE','hi_');
break;
case 'tamil':
define('TEXT_LANGUAGE','ta_');
break;
case 'telugu':
define('TEXT_LANGUAGE','te_');
break;
case 'bengali':
define('TEXT_LANGUAGE','be_');
break;
case 'kanada':
define('TEXT_LANGUAGE','ka_');
break;
default :
define('TEXT_LANGUAGE','');
break;
}
}
$search_location_name=$_POST['TR_name'];
$display_size=$_POST['size_of_display'];
$map_type=$_POST['type_of_map'];
//getting from data base
$data=getAnyTableWhereData(LOCATION_TABLE,"name='".$search_location_name."'","*");
$location_name=$data['name'];
$latitude=$data['lat'];
$langitude=$data['lng'];
$weather=$data['weather'];
$temp=$data['weatherinfo_temp'];
$humidity=$data['weatherinfo_humidity'];
$distance_from=$data['distance_from'];
$distance_to=$data['distance_to'];
$depth_from=$data['depth_from'];
$depth_to=$data['depth_to'];
// $fish_info=$data['fish_info'];
$warning=get_name_from_table(WARNING_TABLE,TEXT_LA NGUAGE.'warning','id',$data['weatherinfo_warning']);
//echo aaa;
//die();
$wind_direction_from=$data['wind_direction_from'];
-
-
-
-
-----------------------------------------------------------------------------------------------------