title: show message success when confirm a form by ajax & jquery
body: <p>when user write her email for Newsletters, i want to show them a suuccess       message </p>
  
  <pre><code>newsletter.php
  &lt;?php
  $templates="templates/";
  require_once 'includes/init.inc.php';
  //require_once 'includes/classes/email.php';
  
  if ($_SERVER['REQUEST_METHOD'] == "POST") {
      if (($result=mail::add_newsletter($_REQUEST['email'])) &gt;0) {
              Util::Redirect("index.php");
    } else {
        echo 'you register befor';
  }
      }
  ?&gt;
  footer.php
  &lt;form action="newsletter.php" method="post" class="searchform" &gt;
                                  &lt;input  type="text" placeholder=" type your email" name="email" /&gt;
                                  &lt;button type="submit" class="btn btn-default"&gt;&lt;i class="fa fa-arrow-circle-o-right"&gt;&lt;/i&gt;&lt;/button&gt;
                                  &lt;p &gt;come on with us to know everything for us&lt;/p&gt;
                              &lt;/form&gt;
  </code></pre>