pastebin of the php script:
// Form success
// Remove the form element form the dom
if($form_success){
// Hide the form
$form = $dom->getElementsByTagName('form')->item(0);
$form->setAttribute("style", "display: none");
// Callbacks
foreach($this->_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->hideIdElement($dom, $hide_id);
}else{
trigger_error( "Form handler is not callable", E_USER_ERROR);
}
}
}
}else{
$this->hideIdElement($dom, self::SUCCESS_MESSAGE_ID);
$this->hideIdElement($dom, self::ERROR_MESSAGE_ID);
}
return str_replace(array( '<?xml version="1.0" standalone="yes"?>',
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
'<html><body>',
'</body></html>'), '',$dom->saveHTML());
}
What I'd like to do with this script is redirect to page (success.html)on success of form submission.
I am pretty new to PHP and would appreciate any help you could offer.
Thank you for taking the time to look at this, it's greatly appreciated.
EDIT: LOL Sorry for the first GIANT CODE DUMP! Fixed.