dongmei2351 2012-09-04 19:23
浏览 25
已采纳

需要添加年份,制作,模型到php [关闭]

I have a quote request page and it is handled by php. This is what I have so far..

$e_body = "You have been contacted by $name, their additional message is as follows." . PHP_EOL . PHP_EOL;
     $e_content = "\"$comments\"" . PHP_EOL . PHP_EOL;


**---THIS IS WHERE I WANT YEAR, MAKE, AND MODEL TO BE DISPLAYED AND NOT SIDE BY SIDE--- 
     Vehicle Year: using $year
     Vehicle Make: using $make
     Vehicle Model: using $model**

     $e_reply = "You can contact $name via email, $email";
     if ($phone) $e_reply .= " or via phone $phone.";        

     $msg = wordwrap($e_body . $e_content . $e_reply,70);

If you have any good input let me know. I don't use php that much or else I could probably knock this out pretty easily.

  • 写回答

1条回答 默认 最新

  • dqwh1209 2012-09-04 20:00
    关注

    If you're receiving the content through a contact form using the $_POST array you can do something like this:

    $year = $_POST["year"];
    $make = $_POST["make"];
    $model = $_POST["model"];
    

    Then add it to the rest of your content:

    $e_content. = "Year: " . $year . "Make: " . $make . "Model: " . $model;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应