title: staying on same page after form post
body: <p>and when you click send a pop up window comes up saying if it has sent successfully or not. thats all i want to happen but at the moment the pop up window comes up and in the window from where the user presses send it goes to the php page the action calls, how do i stop that window going to the php page and just have a pop up window come up?</p>
  
  <p>form code:</p>
  
  <pre><code>&lt;form method="post" class="contact-form" action="php/callback.php" &gt;
                  &lt;input name="name" type="text" id="formbox" value="Name" onfocus="(this.value == 'Name') &amp;&amp; (this.value = '')" onblur="(this.value == '') &amp;&amp; (this.value = 'Name')"/&gt;&lt;br /&gt;
                  &lt;input name="number" type="text" id="formbox" value="Number" onfocus="(this.value == 'Number') &amp;&amp; (this.value = '')" onblur="(this.value == '') &amp;&amp; (this.value = 'Number')"/&gt;&lt;br /&gt;
                  &lt;input type="submit" value="Send" id="formbutton"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>php code:</p>
  
  <pre><code>&lt;?php
  
  $name = $_POST['name'];
  $number = $_POST['number'];
  
  $to = "email@email.co.uk";
  $subject = "Call Back Enquiry";
  $message = "Hi Raymond, someone that came to your website wants you to call them back, their name is '$name' and their number is '$number'";
  $from = "Your Website";
  $headers = "From:" . $from;
  $send_contact = mail($to,$subject,$message,$headers);
  
  if($send_contact){
  echo "&lt;script&gt;alert('We will contact you shortly');&lt;/script&gt;";
  }
  else {
  echo "&lt;script&gt;alert('Something went wrong, try again!');&lt;/script&gt;";
  }
  ?&gt;
  </code></pre>