title: Why am I getting "Undefined variable: POST" in C:\wamp64\www\form\appointmentform.php notice here?
body: <p>I'm a beginner with php and I am trying to test out my contact form on localhost. When I hit submit I'm getting this notice: "Notice: Undefined variable: POST in C:\wamp64\www\form\appointmentform.php on line 5" I saw a suggestion on here to use $_POST instead of $POST, however that's what I'm doing so I can't figure out the problem here.</p>
  
  <p>Here is my HTML code:</p>
  
  <pre><code>    &lt;!doctype html&gt;
  &lt;form action="appointmentform.php" method="POST"&gt;
  &lt;select name="dropdown" class="float-left"&gt;
                         &lt;option value="option"&gt;Select a Service&lt;/option&gt;
                         &lt;option value="Facial"&gt;Facial&lt;/option&gt;
                         &lt;option value="Threading"&gt;Threading&lt;/option&gt;
                     &lt;/select&gt;
  
  &lt;input class="float-right" placeholder = "mm/dd/yy" aria-invalid="false" type="date" name="date"&gt;
  &lt;input class="right" placeholder = "Time" aria-invalid="false" type="time" name="time"&gt;
  &lt;p class="sub-tit"&gt;Personal Information&lt;/p&gt;
  &lt;input class="float-left" placeholder="Full Name" type="text" name="name"&gt;
  &lt;input class="float-left" placeholder="Phone" type="text" name="phone"&gt;
  &lt;input type="text" placeholder="Email" name="email"&gt;
  &lt;input type="submit" class="qbuuton float-right" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is my PHP code:</p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $phone = $_POST['phone'];
  $email = $_POST['email'];
  $dropdown = $POST['dropdown'];
  $date = $_POST['date'];
  $time = $_POST['time'];
  $formcontent="From: $name \n Phone: $phone \n Email: $email \n Service: $dropdown \n Date: $date \n Time: $time";
  $recipient = "email@gmail.com";
  $subject = "Customer Appointment Request";
  $mailheader = "From: $email \r\n";
  mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
  echo "Thank You!";
  ?&gt;
  </code></pre>