<?
require_once "include/application.php"; 
require_once "include/function.php";

	$sql="select * from contact_temp";
	$result=mysql_query($sql);	
	while($myrow=MySQL_fetch_array($result,MYSQL_ASSOC))
	{
		$row[]=$myrow;
	}
	
	for($i=0;$i<count($row);$i++){
//	echo	$sql="update person set p_phone1='".$row[$i]["tel"]."', p_phone2='".$row[$i]["handphone"]."',p_fax='".$row[$i]["fax"]."'
	//	where p_name='".$row[$i]["name"]."'";

	echo	$sql="update company set c_phone1='".$row[$i]["tel"]."', c_phone2='".$row[$i]["handphone"]."',c_fax='".$row[$i]["fax"]."'
		where c_name='".$row[$i]["name"]."'";

		@mysql_query($sql) or die(mysql_error());

	}

?>