that ?styleid query is captured somewhere in the requested files, I have no idea which one is treating the '?styleid' since there's so many things happening in global.php. It would be logical to think it somewhere in global.php since it requested in all files, but by my experiments, it may not be in this file. If I can identify where the query is treated I could extract the formula where the theme change and refresh in the browser.
Meanwhile, I found an exchange solution for my redirect URL problem. In my form I replaced the "s" value:
HTML Code:
<input type="hidden" name="s" value="index.php" />
This way I have control of the user redirection.
in myprofile.php, I replaced the exec_header_redirect(); with this:
PHP Code:
exec_header_redirect($_POST['s']);
This way, myprofile.php is recyclable in any forms I put with the "s" id.
I'm going to re-edit my original code on post #1 on this effect.