<?php
include("config.php");
//require_once("tcpdf_autoconfig.php");
 require_once("tcpdf.php");
 

if (isset($_POST['submit']))
{

$cname=$_POST['cname'];

$da= date('Y-m-d H:i:s', strtotime($_POST['bday']));
$show_date= date("F j, Y, g:i a", strtotime($_POST['bday']));
//$date=$_POST['date'];

//Modified by Sana on [15.01.17][To accept special characters in text][Start]
//$smstext=$_POST['smstext'];
$smstext=mysql_real_escape_string($_POST['smstext']);
//Modified by Sana on [15.01.17][To accept special characters in text][End]
$smstype=$_POST['smstype'];
$delivered=$_POST['delivered'];
$undelivered=$_POST['undelivered'];
$price_state=$_POST['state_type'];
$countryid=$_POST['countryid'];
$senderid=$_POST['senderid'];

 $price_state=$_POST['state_type'];
$operator=$_POST['yes'];
$charges=$_POST['charges'];
$total=$_POST['total'];
$mesch=($charges * $total);

$chargeforsms="AED ".$charges;
$charge="AED ".$mesch;
$img_path = _BASE_PATH."images/bar.jpg";


$sql="INSERT INTO `memberinfo` (
`clientname` ,
`senddate` ,
`smstext` ,
`smstype` ,
`delivered` ,
`subtooperator` ,
`chargeforsms`,
`totalsms`,
`pdf`,
`undelivered`,
`country`,
`senderid`,
`price_type`
)
VALUES('$cname','$da', '$smstext', '$smstype', '$delivered', '$operator','$charges','$total','$filename','$undelivered','$countryid','$senderid',$price_state)";
//echo $sql;
$result=mysql_query($sql);
if($result){
echo "<script>window.location='welcome.php'</script>";
		
echo "Successful";
}

else {
//echo mysql_error;
echo "ERROR";
}

}
?>
