doudang8824 2017-04-18 17:32
浏览 26
已采纳

如何以简单的联系表格显示粗体文本?

I would like to know how to bold face certain text in a contact form. I am sort of new at this. I would like categorize the output of the form. For example:

Contact Information: (in bold) Name:
Email: . . . Event / Trip Details: (in bold) Num of passengers: . . .

So far I have only "Contact information:" and "Event / Trip Details" below. I am not sure what to do to bold face them.

    $formcontent="Contact Information:  
 
Name: $name 
 
Email: $email 
    
 
Phone: $phone 
 
Company / Group Name: $cmpny 
 
Street Name: 
    $street 
 
City, State, Zip Code: $city_st_zip 
 
Respond Via:  
    $respond 
 
Event / Trip Details: 
 
Number of Passengers:  
    $num_passengers 
 
Trip Type:  $trip_type 
 
Number of Pickups:  
    $num_pickups 
 
Bus Size:  $bus_size 
 
Name:  $pickup_name 
 
    
Street Name:  $pickup_street_name 
 
City, State, Zip Code:  
    $pickup_city_st_zip 
 
Depart Date:  $depart_date 
 
Depart Time:  
    $depart_time 
 
Name:  $dropoff_name 
 
Street Name:  
    $dropoff_street_name 
 
City, State, Zip Code:  $dropoff_city_st_zip 
    
 
Return Date:  $dropoff_date 
 
Return Time:  $dropoff_time 
 
    
Itinerary / Special Instructions / Additional Info:  $spec_instr 
 
    
Airport Meet & Greet:  $meet_greet 
 
ADA Accessible Coach:  $ada 
 
    
Extra Storage:  $extra 
 
How did you find us?  $find_us";
    $recipient = "jldouglas58@gmail.com";
    $subject = "Request for a Quote";
    $mailheader = "From: $email 
";
    mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
    header( 'Location: http://www.distancebrothers.com/quote-
    confirmation.html') ;?>

展开全部

  • 写回答

3条回答 默认 最新

  • dtnd30892 2017-04-18 17:39
    关注

    First of all the email header shoud state that the mail is in HTML format.

    $headers .= "Content-Type: text/html; charset=ISO-8859-1
    ";
    

    Then you format your message in HTML eg:

    $formcontent="<html> <body>Contact Information:  
     
    Name: <strong>$name </strong>
     
    Email: $email 
        
     
    Phone: $phone 
     
    Company / Group Name: $cmpny 
     
    Street Name: 
        $street 
     
    City, State, Zip Code: $city_st_zip 
     
    Respond Via:  
        $respond 
     
    Event / Trip Details: 
     
    Number of Passengers:  
        $num_passengers 
     
    Trip Type:  $trip_type 
     
    Number of Pickups:  
        $num_pickups 
     
    Bus Size:  $bus_size 
     
    Name:  $pickup_name 
     
        
    Street Name:  $pickup_street_name 
     
    City, State, Zip Code:  
        $pickup_city_st_zip 
     
    Depart Date:  $depart_date 
     
    Depart Time:  
        $depart_time 
     
    Name:  $dropoff_name 
     
    Street Name:  
        $dropoff_street_name 
     
    City, State, Zip Code:  $dropoff_city_st_zip 
        
     
    Return Date:  $dropoff_date 
     
    Return Time:  $dropoff_time 
     
        
    Itinerary / Special Instructions / Additional Info:  $spec_instr 
     
        
    Airport Meet & Greet:  $meet_greet 
     
    ADA Accessible Coach:  $ada 
     
        
    Extra Storage:  $extra 
     
    How did you find us?  $find_us </body> </html>";
    

    展开全部

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部