<? include('lock.php');?> 
<? include('config.php');?> 

<?php
$ar_symb = $_POST['ar_symb'];
$dik_ofel = $_POST['dik_ofel'];
$name = $_POST['name'];
$afm = $_POST['afm'];
$amka = $_POST['amka'];
$epitagi = $_POST['epitagi'];
$room = $_POST['room'];
$typos_domatio = $_POST['typos_domatio'];
$plithos_dom = $_POST['plithos_dom'];
$date_in = $_POST['date_in'];
$date_out = $_POST['date_out'];
$imeres = $_POST['imeres'];
$dianiktere = $_POST['dianiktere'];
$epidotisi = $_POST['epidotisi'];
$simetoxi = $_POST['simetoxi'];
$hotel = $_POST['hotel'];
$periodos = $_POST['periodos'];
$ar_ofel = $_POST['ar_ofel'];
$katoikos =$_POST['katoikos'];


foreach($_POST['ar_symb']as $k => $id)
{
    $name= mysql_real_escape_string($id);
	

	
	

    $query1 = "INSERT INTO oaed_thea(`ar_symb`, `dik_ofel`, `name`, `katoikos`, `afm`, `amka`, `epitagi`, `room`, `typos_domatio`, `plithos_dom`, `date_in`, `date_out`, `imeres`, `dianiktere`, `epidotisi`, `simetoxi`, `hotel`, `periodos`, `ar_ofel`) VALUES ('$ar_symb[$k]','$dik_ofel[$k]','$name[$k]','$katoikos[$k]','$afm[$k]','$amka[$k]','$epitagi[$k]','$room[$k]','$typos_domatio[$k]','$plithos_dom[$k]',
'$date_in[$k]','$date_out[$k]','$imeres[$k]','$dianiktere[$k]','$epidotisi[$k]','$simetoxi[$k]','$hotel[$k]','$periodos[$k]','$ar_ofel[$k]')";
    
	$query = mysql_query($query1);
}
if($query)
{
echo "ok";
}
else{
    echo "Something Wrong";
}
?>
<meta http-equiv="refresh" content="0; url=http://<? echo $linkh?>home.php" />