title: HTML/ PHP form , error - Undefined index: action in PHP code
body: <p>Error in PHP code. Still showing me this error "Undefined index: action"
  in php function $action = $_REQUEST['action']; Could you please help me to find out the solution. </p>
  
  <p>thank you</p>
  
  <p>full code here : </p>
  
  <pre><code>&lt;?php
      $action = $_REQUEST['action']; 
      if ($action== "") { 
  ?&gt;
      &lt;form  action="" method="POST" &gt; 
          Meno*:&lt;br&gt; 
          &lt;input name="name" type="text" value="" size="30"/&gt;&lt;br&gt; 
          Email*:&lt;br&gt; 
          &lt;input name="email" type="text" value="" size="30"/&gt;&lt;br&gt; 
          Vaša otázka*:&lt;br&gt; 
          &lt;textarea name="message" rows="11" cols="80"&gt;&lt;/textarea&gt;&lt;br&gt; 
          &lt;input type="submit" value="Posla&amp;#357; email"/&gt; 
      &lt;/form&gt; 
  &lt;?php 
      }  
      else                /* send the submitted data */ 
      { 
          $name = $_REQUEST['name']; 
          $email = $_REQUEST['email']; 
          $message = $_REQUEST['message']; 
          if ( ($name=="") || ($email=="") || ($message=="") ) { 
              echo "Všetky políčka je potrebné vyplniť. Napíšte &lt;a href=\"\"&gt; otázku  &lt;/a&gt; ešte raz."; 
          } else {         
              $from = "From: $name&lt;$email&gt;\r\nReturn-path: $email"; 
              $subject = "Message sent using your contact form"; 
              mail("27phillip@gmail.com", $subject, $message, $from); 
              echo "Mail poslaný!"; 
          } 
       }   
  ?&gt;
  </code></pre>