Well this is where I have it (using your piece of code in myadoptsview)
PHP Code:
//This is for sorting!
if($mysidia->input->post("sortpets")){
$choice = $mysidia->input->post("sortlist");
$mysidia->db->update("users_options", array("petsort" => $choice), "username = '{$mysidia->user->username}'");
header("Location: $root/myadopts");
exit;
}
$sortForm = new Form("sortform", "", "post");
$sort_list = new DropdownList("sortlist");
$sort_list->add(new Option("Clicks", "clicks"));
$sort_list->add(new Option("Gender", "gender"));
$sort_list->add(new Option("Level", "level"));
$sort_list->add(new Option("Name", "name"));
$sortForm->add(new Comment("<b>Sort by:</b>", FALSE));
$sortForm->add($sort_list);
$sortForm->add(new Button("Sort Pets", "sortpets", "submit"));
$document->add($sortForm);
//Sorting ends here!!!
It works every time for me o.O A seamless redirect with no stuttering or anything...
EDIT: There might be an error appearing for me but in my php.ini file of WAMP I have errors turned off for things like that. The orange ones appear but the ones that sometimes pop up in the top don't appear anymore. Kyttias did a tutorial for it. I think it was her anyway...
And I also have them turned off on my live site (I develop on WAMP and then test it live, just to make sure it works every so often)