$redirect = "/test_ajax_form.php"; /* * This is just for testing purposes */ if (defined('AJAX_REDIRECT_URI')) { $redirect = AJAX_REDIRECT_URI; } $message["Actions"][] = array("Action" => "Redirect", "URL" => "http://" . GetEnv("HTTP_HOST") . dirname(GetEnv("REQUEST_URI")) . $redirect); } break; } /* * Reply to the form submit event to tell which actions the * AJAX submit input should execute on the browser side. */ if (strlen($form->ReplyMessage($message, $processed))) { exit; } } while (!$processed && $form->GetNextMessage($message)); if ($processed) { exit; } } /* * Normal non-AJAX form processing */ /* * Load form input values eventually from the submitted form. */ $form->LoadInputValues($form->WasSubmitted("doit")); $verify = array();