<?php
include "scrinit.php";
include $menu;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMS BIRTHDAY</title>
</head>
<body>
<h2> ΑΠΟΣΤΟΛΗ ΜΗΝΥΜΑΤΩΝ SMS ΓΙΑ ΓΕΝΕΘΛΙΑ</h2>

<?php
require "dbconnect.php";

$sms="ΧΡΟΝΙΑ ΠΟΛΛΑ ΜΕ ΠΡΟΟΔΟ, ΥΓΕΙΑ, ΕΥΤΥΧΙΑ  ΚΑΙ ΕΠΙΤΥΧΙΑ ΣΤΟΥΣ ΣΤΟΧΟΥΣ ΣΟΥ";
echo "<br >"."ΚΑΘΟΡΙΣΜΟΣ MHNYMAΤΟΣ :"."<br >";; 
echo "<textarea name='sms' cols='78' rows='2'>$sms </textarea >"."<br >"; 

$_SESSION['sms']=$sms;
$dt=$_SESSION['dt'];

//select birthday
$sql = mysqli_query($con,"SELECT birthday,eponimo,onoma,kmathiti  FROM allstudentinfo ");
$c=mysqli_num_rows($sql);
$i=1;$k=0;
while ($row = mysqli_fetch_array($sql)) 
{
	$bd=$row['birthday'];
	
	$bd = strtotime($bd);
	if (date('m-d')== date('m-d', $bd)) {
		echo $row['onoma']." ".$row['eponimo']. " ".$row['birthday']."<br>";
		$tsms[$i]=$row['kmathiti'];
		$k++;}
   	$i++;
}
echo $k;
$_SESSION['tel']=$tsms;
$_SESSION['sms1']=trim($sms);
echo "sending sms";
include "smssecret.php";	
?> 
<br> <br><br> <br><br> <br><br> <br>
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού  </a>  
</body>
</html>
