php - Form not showing input data -


i have running form , it's half working. form sends email address correctly i'm having issues inputs not showing text in email. 1 spits out data message section.

the name, email, phone , website inputs not spitting out data , can't figure out why?

// html5 code

   <form action="forms/get_form.php" method="post">        <div>          <label for="name">name</label>            <input type="text" id="name" placeholder="enter name" required="required">        </div>        <div>           <label for="email">email</label>             <input type="email" id="email" placeholder="email address" required="required">        </div>        <div>           <label for="phone">phone number</label>             <input type="tel" id="phone" placeholder="enter phone number" required="required">         </div>         <div>            <label for="website">enter website url if have 1 (optional)</label>              <input type="url" id="website" placeholder="website address">          </div>          <div>            <label for="message">enter message</label>              <textarea name="message" id="message" rows="10"></textarea>          </div>          <div>            <button type="submit" class="btn-blue">send</button>          </div>   </form> 

// php code

<?php $name = $_post['name']; $email = $_post['email']; $phone = $_post['phone']; $website = $_post['website']; $message = $_post['message']; $formcontent=" from: $name \n email: $email \n phone: $phone \n website: $website \n message: $message"; $recipient = "email goes here"; $subject = "contact form"; $mailheader = "from: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader); if(mail) { header('location: /thankyou.html');  } else {echo "email failed send click , check email details!";}  ?> 

thanks in advance

vizzy

not id name param,

<input type="text" id="name" placeholder="enter name" required="required"> 

should be:

<input type="text" name="name" placeholder="enter name" required="required"> 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -