
<?php
include "scrinit.php";
if (isset($_POST['submit'])) 
{
	$tm=array();
	$i=0;
	$sms1=$_POST['sms'];
	$tel=$_POST['tsms'];
	echo "<p>"."ΘΑ ΣΤΑΛΕΙ ΤΟ ΑΚΟΛΟΥΘΟ ΜΗΝΥΜΑ ΣΤΟΥΣ ".$rec." :"."</p>";
	echo "<p>".$sms1."</p>";
	echo "<table class='myTable' >
	<tr style='border:1px solid black' bgcolor='#d6ff73'  >
	<th>Α/Α</th>
	<th>Α.Μητρ</th>
	<th>Όνομα</th>
	<th>Τηλέφωνο</th>
	";
	
	foreach ($tel as $t)
	{
	   $ar=explode("/",$t);
	   $tm[$i]=trim($ar[0]);
	   $mit[$i]=$ar[1];
	   $nam[$i]=$ar[2];
	   echo "<tr>"."<td>".$i."<td>".$mit[$i]."<td>".$nam[$i]."<td>".$tm[$i]."</tr>";
	   $i++;
	}	   
	echo "</table>";
	echo "<br>";
	$_SESSION['fl']="teach";
	$_SESSION['sms1']=$sms1;
	$_SESSION['tel']=$tm;
	include "smssecret.php";
}