auto jump to another page

Hi ,

I would like to do a smthing like automatic jump to another page…

example,if i have updated a information,another page will notice that the changes were saved and will automatic jump to home page in fews second…

i have see this function in some of the blogger website, but i dunno how to do…

someone pls help me…

Well I’m not sure exactly what you want to do… another page won’t be able to “notice” that changes were made. But when your user click the “save” button, after the code that saves their updated information, use the http headers to redirect to the appropriate page.

echo header(“Location: url=”);

but remember that this has to be the first output. you can’t output anything to the browser BEFORE the header.

I understand what u means, if direct use echo by the header,the page will directed to another page.

Yes,when i click the 'save" button,it will go another page and updated d information. what i means is,after it update the information at d page,it need told the user that the info was updated.After a fews seconds,then page will automatically jump to another page. The user are able to view the updated pages and without clicking any button,it will automatically jump to another page.

Hope u can help me…thanks so much

What you want is an html tag called meta. There’s also a javascript alternative I think, but that would not work if the visitor has javascript disabled.

Ok, I think I understand what you mean.

You have a page with a form on it. The user enters some data then clicks save. They then see a page which shows them some sort of confirmation that their data has been saved. You want that page to display for a few seconds then automatically take them to another page. Am I correct?

If I am correct then there is a simple php solution.

On the very first line of the php that displays the confirmation page put the following…

echo header("Refresh: 5 url=");

5 is the number of seconds before the redirect and url is the page you want to take them to.

Good Luck!

yaya, that exactly wat i need…thanks so much…i try it out

Sponsor our Newsletter | Privacy Policy | Terms of Service