-1

今天的困境是php的形式。然而,这个'send_contact'脚本确实是非常基本的东西,而不是简单地回显消息。我们想回显或重定向到一个可爱的样式html页面。

    <?php
    // Contact Subject
    $fullname = $_POST["full_name"];
    // Details
    $businessname = $_POST["business_name"];
    $addressline1 = $_POST["address_line_1"];


    //HTML email
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    // Mail of Sender
    $mail_from = $_POST["email_addr"];
    //From
    $headers .="from: <".$mail_from.">";

    //Enter your email address
    $to ="mywifelovesphp@php.co.uk";
    $subject = "Catalogue Request - ".date("d/m/Y");
    $message = "<html> <body>";
    $message .= "<h3>".$businessname."</h3>\r\n";
    $message .= $fullname."\r\n";
    $message .= $addressline1."\r\n";
    $message .= "</body></html>";

    $send_contact=mail($to,$subject,$message,$headers);


    //Check, if message sent to your email
    //display message "We've recieved your information"
    if($send_contact)
    {echo "We've recieved your information";
    }
else {
echo "Error";
}   
    ?>
4

1 回答 1

0

您可以在标签中回显样式。如果您使用类将继承的类回显标签,我尝试在标题部分创建一个类。它适用于我这里是一个例子。只需删除 "" 。它会显示!

      echo "<p style=color:blue;margin-left:20px;>We've recieved your information</p>"
于 2013-06-20T09:59:06.680 回答