Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hello guys.
i recently wrote a small script for a friend, just simple conditioned statements. it worked the first time for a couple of days but now it sends a timeout message. My script is used to send an email message to a phone.Code: Select all
<?php
$headers="from: tyrone.com";
$sms=$_POST["message"];
$num=$_POST["phone"];
$code=$_POST["code"];
$to="$code"."$num";
if(($code=="0772") ||($code=="0782")||($code=="0774"))
{
$email=$to."@mtnconnect.co.ug";
}
else if($code=="0712"){
$email=$to."@utmobile.ug";
}
else {
echo "sms app doesnot support this carrier";
$email=NULL;
}
if($email !=NULL){
if(mail( $email, $subject, $sms, $headers )){
echo "<p>The sms was sent.</p>";
}
else {
echo "<p>error sending message to $to";
}
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]