Добрый день, не подскажете как сделать редирект на /account/settings после нажатия на кнопку регистрации?
<code> <div class="form-actions">
<button id="settings_save" tabindex="5" class="prj-button prj-button-blue" type="submit"><?php echo $TEXT['btn-signup']; ?></button>
</div>
</form>
</div></code>
полный код
<?php
if (isset($i_am))
{
header("Location: /");
}
$page_id = "signup";
$error = false;
$error_message = '';
$login = '';
if (!empty($_POST))
{
$error = true;
$login = isset($_POST['user_page']) ? $_POST['user_page'] : '';
$passw = isset($_POST['user_password']) ? $_POST['user_password'] : '';
$confirm = isset($_POST['user_confirm']) ? $_POST['user_confirm'] : '';
$token = isset($_POST['token']) ? $_POST['token'] : '';
$user_captcha = isset($_POST['user_captcha']) ? $_POST['user_captcha'] : '';
$login = trim($login);
$passw = trim($passw);
$confirm = trim($confirm);
if (isset($_SESSION['token']))
{
if ($_SESSION['token'] === $token)
{
if ($app->isCorrectLogin($login))
{
if (!$app->LoginExists($login))
{
if ($app->isCorrectPassw($passw))
{
if ($confirm === $passw)
{
if ($_SESSION['captcha'] == $user_captcha)
{
$app->RegUser($login,$passw);
unset($_SESSION['token']);
if ($app->LoginAfterReg($login,$passw))
{
header("Location: /");
}
}
else
{
$error_message = $TEXT['error-captcha'];
}
}
else
{
$error_message = $TEXT['error-passw-confirm'];
}
}
else
{
$error_message = $TEXT['error-passw-format'];
}
}
else
{
$error_message = $TEXT['error-username'];
}
}
else
{
$error_message = $TEXT['error-login-format'];
}
}
}
}
GenGlobalToken();
$css_files = array("style.css");
$page_title = $TEXT['menu-signup']." | ".APP_TITLE;
include_once("../html/common/header.inc.php");
?>
<body class="noface-theme">
<?php
include_once('../html/common/topbar.inc.php');
?>
<div id="page-outer">
<div class="wrapper-main">
<div class="left-sidebar">
<div class="usermenu">
<?php
include_once("../html/common/leftbar.inc.php");
?>
</div>
</div>
<div class="profile-wrapper noface">
<div class="page-header"><?php echo $TEXT['menu-signup']; ?></div>
<div class="questions-content">
<div class="adv-data">
<span class="warning center">
<div class="share1 fb" style="margin-top: 0px; display: inline-block;">
<a style="" href="/facebook/?action=login">Facebook</a>
</div>
<div class="share1 vk" style="margin-top: 0px; display: inline-block;">
<a style="" href="/vkontakte/?action=login">VK.com</a>
</div>
<div class="share1 tw" style="margin-top: 0px; display: inline-block;">
<a style="" href="/tw_session">Twitter</a>
</div>
</span>
</div>
<?php
if ($error)
{
?>
<div class="adv-data">
<a id="adv-remove" class="delete" href="javascript:;"></a>
<span class="error center"><?php echo $error_message; ?></span>
</div>
<?php
}
?>
<div class="content-main">
<form id="loginform" class="form-horizontal signup_form" method="POST" action="/signup" autocomplete="off">
<input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>">
<fieldset id="userpage_fieldset" class="control-group">
<label for="user_page" class="control-label"><?php echo $TEXT['pagename'] ?>:</label>
<div class="controls">
<input id="user_page" tabindex="1" maxlength="16" name="user_page" type="text" value="<?php echo $login; ?>">
<p><?php echo $TEXT['pagename-comment']; ?></p>
</div>
</fieldset>
<fieldset id="usernewpassword_fieldset" class="control-group">
<label for="user_password" class="control-label"><?php echo $TEXT['passw']; ?>:</label>
<div class="controls">
<input id="user_password" tabindex="2" maxlength="12" name="user_password" type="password" value="">
<!-- <p><?php echo $TEXT['passw-comment']; ?></p> -->
</div>
</fieldset>
<fieldset id="userconfirm_fieldset" class="control-group">
<label for="user_confirm" class="control-label"><?php echo $TEXT['passw-confirm']; ?>:</label>
<div class="controls">
<input id="user_confirm" tabindex="3" maxlength="12" name="user_confirm" type="password" value="">
<!-- <p>Максимум 12 символів.</p> -->
</div>
</fieldset>
<fieldset id="usercaptcha_fieldset" class="control-group">
<label for="user_captcha" class="control-label"><?php echo $TEXT['captcha']; ?>:</label>
<div class="controls">
<span style="display: block;">
<input id="user_captcha" tabindex="4" maxlength="3" style="width: 100px;float:left;" name="user_captcha" type="text" value="">
<span class="captcha"><img alt="captcha" src="/captcha/captcha.php"></span>
</span>
<p style="clear: both"><?php echo $TEXT['captcha-comment']; ?></p>
</div>
</fieldset>
<hr>
<fieldset id="userterms_fieldset" class="control-group">
<div class="controls">
<?php echo $TEXT['label-terms-agree']; ?><a href="/<?php echo APP_NAME; ?>/terms"><?php echo $TEXT['label-terms']; ?></a>
</div>
</fieldset>
<div class="form-actions">
<button id="settings_save" tabindex="5" class="prj-button prj-button-blue" type="submit"><?php echo $TEXT['btn-signup']; ?></button>
</div>
</form>
</div>
</div>
</div>
<div class="small-footer">
<?php
include_once("../html/common/footer.inc.php");
?>
</div>
</div>
</div>
</body>
</html>