Not everyone has javascript enabled through, and some browsers don't process the javascript history back buttons.
One sure way to do this, is to edit your register links to include the current page. So if they are on home.php?cat=2 the register link would become register.php?return=home.php?cat=2
Then in your register.php you grab the return variable, secure it, pass it to smarty, and embed it in your register.tpl form. So that the return variable will be posted with the registration information. Then on a successful register you do a func_header_location("$return");
|