I am writing a program that send mail to a phone number however when i test it it says mail sent but when in fact it does not send the mail yet i think everything looks right since i get no error msg
here is the code
<?php
//php begins here.
if (isset($POST['submit'])){
if (strlen($POST['name'])>0){ //check for the name
$name=$_POST['name'];}
else{
$name=FALSE;
echo "You forgot to enter your name<br />";}
if (strlen($POST['message'])>0){ //check if a message was typed
$message=$POST['message'];}
else{
$message=FALSE;
echo "You Did not type a message<br />";}
if (is_numeric($POST['phone_num'])){//check if it is a valid phone number
$phone_num=$POST['phone_num'];}
else {
echo "A Valid phone number is required to Send the message<br />";}
if ($POST['counter']>140){ //check to see how long the message is
echo "Your message is more than 150 Characters.<br />";}
elseif ($POST['counter']<=140){
$counter=$_POST['counter'];}
if($network=="0"){//check if a network is selected
echo "NO NETWORK SELECTED SELECT A NETWORK TO SEND MESSAGE<br />";}
else {
$network=$_POST['$network'];}
$date=date("l dS of F Y h:i:s A");
$hh="sms@bitunde.com";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From: $hh <$hh>\r\n";
$headers .= "Reply-to: $hh <$hh>\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP mailer\r\n";
$nem="FROM:".$name;
//NETWORKS:
if($network=="1"){$net="mtnconnect.co.ug";}
if($network=="2"){$net="sms.ugandatelecom.com";}
$phonenum=$phone_num."@".$net;
//SENDSMS if everything is fine and set
if ( $name =TRUE ){
mail($phonenum,$nem,$message,$headers);
echo "MESSAGE SENT TO: ",$phone_num,"..on..",$date;}
// header( 'Location www.bitunde.com/techsms.php ')
else { //when something has not been filled in completely.
echo "<p>You Left a field blank<br />MESSAGE NOT SENT PLEASE GO BACK AND TRY AGAIN</p>";}
} else { //This displays the form
?>
after this is include some html and the the curly brace for the else in php quotes