Forum Moderators: coopster

Message Too Old, No Replies

Email to SMS

         

Saboi

5:24 pm on May 1, 2007 (gmt 0)

10+ Year Member



Hi People,

I would like to send an SMS from my website using Clickatell where i have an account.I have the following code but it is not working.I am not getting any SMS even if the success message comes up on screen.(Yes i have credit).Please someone advice where am going wrong.

Thanks.

Saboi

<?php

$cell=$_POST["number"];

$message="api_id:#*$!#*$!x\r
user:#*$!#*$!\r
password:#*$!#*$!\r
to:$cell\r
reply:email@address\r
text:SMS from Website";

if(mail($to="sms@example.com",$subject,$message)){echo"Messgae Sent";}

else{echo"Message not sent";}

?>

[edited by: dreamcatcher at 7:20 am (utc) on May 2, 2007]
[edit reason] Use example.com, thanks. [/edit]

coopster

3:19 pm on May 3, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



$subject is not defined.

Do you have error_reporting() [php.net] turned up so you can see your error messages while you are in development? Keep it off on your live server though.