Thanks for the heads up, jeff. I'll try this out a bit later. Cheers! Weng -----Original Message----- From: Jeff Bennett [mailto:JBennett@Earthling.net] Sent: Thursday, September 16, 2004 11:49 PM To: php-objects@yahoogroups.com Subject: Re: Returning to previous page If I understand what you mean, you would like them to go back to the last page they were on before they came to this page where they might have clicked a few icons and updated the page? In my applications where I need to do this, I carry around a variable called $returnto. Then all of my urls contain '&returnto=' . myGetURI($returnto). On the page with the clickable icons, just use '&returnto=' . $returnto on the icons in order to not add the current page into the history. Then you can have a back button with href=$returnto. The code below adds the current page to the $returnto variable, preserving other querystring variable. function myGetURI($returnto) { global $QUERY_STRING; global $SCRIPT_NAME; if ($returnto=='close') { $function_ret='close'; } else { $QS=$QUERY_STRING.''; $tempURI=$SCRIPT_NAME.($QS!=''?'?'.$QS:''); if ((strpos($QS,"returnto")==0) && ($returnto!='')) { $tempURI=hrefargs($tempURI,'returnto',$returnto); } $function_ret=rawurlencode($tempURI); } return $function_ret; } function hrefargs($href,$arg,$val) { $function_ret = $href.((strpos($href,'?')>0)?'&':'?').$arg.'='.rawurlencode($val); return $function_ret; } ----- Original Message ----- From: "Weng Cheng" <wengcheng@ephone.com.ph> To: <php-objects@yahoogroups.com>; <php_king@yahoogroups.com>; <php-list@yahoogroups.com>; <php_mysql@yahoogroups.com> Sent: Thursday, September 16, 2004 12:42 AM Subject: Returning to previous page > Hi all, > > I got a dynamic page where a list is called from the DB. Now, I have an > icon with a tag for each item wehreby you can click on the icon and it > changes the status for that item. How do I return to the previous page, > since my function I called as a separate file. > > Let me know if this is in the manual. ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/