Page 1 of 1

Refresh

Posted: Thu Jun 19, 2003 5:09 pm
by negblo
How would get a page to refresh upon re-entry....

lets say,

i select a Department, and then click the Edit button which takes me to a new page to edit the Department that was selected. After i edit the Department, and then click my submit button so that the changes take place, how do i get the Edit page to send me back to the first one and refresh it so the new changes are now visible...

I can, and have been, just click the refresh button, but to users checking the page, they might not know this... so i want to do it for them..

any ideas????!!!!!



Thanx-a-mil

negblo

Posted: Thu Jun 19, 2003 6:01 pm
by trollll
If you include the following in the head of the HTML for the page to get edited, it should take care of that:

Code: Select all

<meta http-equiv="cache-control" content="no-cache" />
Also, if you keep track of the page the user had visited when they clicked "edit" you can send the user back to that page using a

Code: Select all

header("location:first_page.php");
once everything has gone through okay.

Posted: Thu Jun 19, 2003 6:35 pm
by negblo
okay, let me see if i got this::

Code: Select all

<meta http-equiv="cache-control" content="no-cache" />
should go on the Edit.php page itself, all i am editing is a name..


and ::

Code: Select all

header("location:first_page.php");
goes where? and on what page? Admin= first page and Edit=second page



Thanx-a-mil

negblo

Posted: Fri Jun 20, 2003 6:32 am
by slick
Just as an extra aside, if you really want to prevent caching, duplicate the no-cache header at the end of the HTML page as well.

See http://support.microsoft.com/default.as ... bContent=1 and http://support.microsoft.com/default.as ... bContent=1 for more info.

Posted: Fri Jun 20, 2003 10:29 am
by trollll

Code: Select all

<meta http-equiv="cache-control" content="no-cache" />
...would go into the HTML head of the page that needs to get refreshed after the person edits the info (the Admin page, I believe). Then you would just stick the following PHP function after whatever PHP code processes the actual request (Edit?).

Code: Select all

header("location:first_page.php");
Hope that helps! :)

Posted: Fri Jun 20, 2003 11:09 am
by negblo
thanx that does help, alot....



Thanx-a-mil

negblo