Directed the user back to the originally selected tab after the form submission.
$result = mysql_query($sql, $db);
$msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
- header('Location: '.$_SERVER['PHP_SELF']);
+ header('Location: '.$_SERVER['PHP_SELF'].'?current_tab='.$_POST['current_tab']);
exit;
}
}
}
-if (!$switch_tab && isset($_POST['current_tab'])) {
- $current_tab = intval($_POST['current_tab']);
+if (!$switch_tab && isset($_REQUEST['current_tab'])) {
+ $current_tab = intval($_REQUEST['current_tab']);
}
if ($current_tab == 1)
$is_auto_login = checkAutoLoginCookie();
if (isset($_POST['submit']) || isset($_POST['set_default'])) {
+ $current_tab = $_POST['current_tab'];
if (isset($_POST['submit']))
{
//copy posted variables to a temporary array
}
$msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
- header('Location: preferences.php');
+ header('Location: preferences.php?current_tab='.$current_tab);
exit;
}