title: Redirect after form success
body: <p>pastebin of the php script: </p>
  
  <p><a href="http://pastebin.com/b43cZjLQ" rel="nofollow">http://pastebin.com/b43cZjLQ</a></p>
  
  <pre><code>// Form success
          // Remove the form element form the dom
          if($form_success){
  
              // Hide the form
              $form = $dom-&gt;getElementsByTagName('form')-&gt;item(0); 
              $form-&gt;setAttribute("style", "display: none");
  
              // Callbacks
              foreach($this-&gt;_callbacks as $data){
                  if(is_callable($data['callback'])){
                      $result = call_user_func($data['callback'], $_POST, $data['config']);
                      $hide_id = $result ? self::ERROR_MESSAGE_ID : self::SUCCESS_MESSAGE_ID;
                      $this-&gt;hideIdElement($dom, $hide_id);   
                  }else{
                      trigger_error( "Form handler is not callable", E_USER_ERROR);
                  }
              }
  
          }
  
      }else{
          $this-&gt;hideIdElement($dom, self::SUCCESS_MESSAGE_ID);
          $this-&gt;hideIdElement($dom, self::ERROR_MESSAGE_ID);     
      }
  
      return str_replace(array(   '&lt;?xml version="1.0" standalone="yes"?&gt;', 
                                  '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"&gt;',
                                  '&lt;html&gt;&lt;body&gt;', 
                                  '&lt;/body&gt;&lt;/html&gt;'), '',$dom-&gt;saveHTML());
  
  }
  </code></pre>
  
  <p>What I'd like to do with this script is redirect to page (success.html)on success of form submission.</p>
  
  <p>I am pretty new to PHP and would appreciate any help you could offer. </p>
  
  <p>Thank you for taking the time to look at this, it's greatly appreciated.</p>
  
  <p>EDIT: LOL Sorry for the first GIANT CODE DUMP! Fixed.</p>