Login and Return to same page

for osCommerce Online Merchant v2.2

This allows User's to log in and return to the page they were asked to login for, not being sent back to index.php Open application top paste at bottom before ?> // if the customer is not logged on, set the page to return to upon login if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) != FILENAME_LOGOFF) && (!strstr($PHP_SELF,'create')) && (!strstr($PHP_SELF,'popup')) { $navigation->set_snapshot(); } ************************************** Open Logout.php Place anywhere if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); $link = $origin_href; } else { $link = tep_href_link(FILENAME_DEFAULT); } ****************** Thats all