无法接收邮件的所有内容

时间:2016-04-12 10:28:03

标签: email

screenshot of mail i received(这只是我的一些代码,用于缩短它的HTML),我不明白为什么我无法获得用户为电子邮件输入的值,而我可以得到NAME,PHONE,COMPANY等其他人的价值观,你能帮我解决什么问题吗?我是初学者,所以请尽量做好。谢谢你

   HTML:
        <form action="contact_sendmail.php" method="post">
        <label for="first name"> First Name *</label><br>
        <input class="textbox" type=text autofocus id="Fname" name="Fname"   maxlength="50"size="30" value=""  required>        
        <br>
        <label for="last name"> Last Name *</label><br>
        <input class="textbox" type=text  id="Lname" name="Lname"   maxlength="50"size="30" value=""  required>         
        <br>
        <label for="email">Email * </label> <br>
        <input class="textbox" type="text"  id="email"    maxlength="50"size="30" value=""   required>      
        <input  class="button" name="submit" type="submit" value="Submit">



    MAIL FUNCTION:

     <?php
         if(isset($_POST['submit'])){
           $msg = 'Name: '.$_POST['Lname']  .$_POST['Fname'] ." \n"
      .'Email: '.$_POST['email'] ."\n"
      .'Phone Number: '.$_POST['phone'] ."\n"
      .'Company: '.$_POST['company'] ."\n"
      .'Number of Employees: '.$_POST['employee_num'] ."\n"
      .'Comment: '.$_POST['comment']  ;



      mail('example@gmail.com', 'sample contact us Form', $msg);

     ?>
     "<script>" alert('successfully sent'); "</script>" 
     <?php
      }else {
       header('location:contact.php');
       exit(0);}

       ?>

0 个答案:

没有答案