回电表格和短信提交

时间:2014-06-05 17:24:56

标签: php forms

我有用PHP编写的回调表单。它使用常规电子邮件,但我也想将该表单提交给SMS电话号码。当我使用gmail并输入 ****** @txt.att.net时 它的工作。但是,当我通过我的电子邮件表单提交时,它不是。

    <?
    $to = "*********@txt.att.net";
    $send = "<center><p class='domeni'>Vasa email je uspesno poslat.<br>Hvala !</p></center><br>";
    $subject = "Subject";
    $name = $_POST['name'];
    $phone = $_POST['phone'];
    $sub = $_POST['sub'];
    $ip = getenv("REMOTE_ADDR");

    $body = " 
    Here are the details:

    Name - $name \n 
    Phone Number - $phone \n 
    IP Address - $ip";
    $slanje=mail($to,$subject,$body);

    if($slanje) {
       print "<META http-equiv='refresh' content='1;URL=thanks.html'>";
    } else {
        echo "ERROR!";
    }

    print "<META http-equiv='refresh' content='1;URL=thanks.html'>";
    ?>

感谢foward

0 个答案:

没有答案