Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Sort "myadopts" page (http://www.mysidiaadoptables.com/forum/showthread.php?t=2199)

parayna 06-12-2017 04:41 PM

OK XD Maybe you have something in your header that is preventing it XD Do you have a redirect already in your header?

Dinocanid 06-12-2017 05:09 PM

I don't have anything in my header as far as I know. Where did you put that line of code, before $mysidia? (directly underneath public function index). I tried putting it both there and in the same spot as the existing redirect; commenting out the current one of course.

EDIT: Putting it above $mysidia doesn't give a white page error, with the warning still appears in the corner and I have to press the button twice for it to work.

parayna 06-12-2017 05:35 PM

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)

parayna 06-12-2017 05:39 PM

Okay, I think it is my browser! I went on Foodbabs and tried it out, and it works perfectly on your site as well as mine. I use Firefox


All times are GMT -5. The time now is 11:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.