View Single Post
  #23  
Old 06-12-2017, 05:35 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 17,778
parayna is on a distinguished road
Default

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)
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.


Last edited by parayna; 06-12-2017 at 05:37 PM.
Reply With Quote