- Posts: 5
- Thank you received: 0
Return to "View Guestbook" page after the Submitio
after a succecfull submition entry?
Please Log in or Create an account to join the conversation.
You can not re-direct using PHP once the page header is loaded. If you need to redirect the user after entry is added, you could use:
Where 20 is the number of seconds you wish the user to wait before it re-directs them to the destination page.
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.
This code would redirect the visitor in my homepage (index) startpage.
But i want (after entry is added) that he returns in the "View Guestbook" page where he can read all messages including his new entry.
A Code like this:
<meta HTTP-EQUIV="REFRESH" content="1; rl=http://www.mydomain.com/guestbook/list.php?page=1&order=asc">
would be right?
But
Where exactly should i put this code? In which file and line?
Please Log in or Create an account to join the conversation.
leftezi wrote: Thanks Pete
This code would redirect the visitor in my homepage (index) startpage.
But i want (after entry is added) that he returns in the "View Guestbook" page where he can read all messages including his new entry.
A Code like this:
<meta HTTP-EQUIV="REFRESH" content="1; rl=http://www.mydomain.com/guestbook/list.php?page=1&order=asc">
would be right?
But
Where exactly should i put this code? In which file and line?
Your code is correct. As to where to put this code, it should go between the <head> and </head> tags in your "header.php" file. You will need to add some PHP logic to the above however, to only show the above HTML code if the current page is "add.php". I will post that for you shortly.
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.
With this:
I set the redirect waiting time to 5 seconds. Feel free to change that as needed.
DigiOz Webmaster
www.digioz.com
Please Log in or Create an account to join the conversation.
It works fine.
Please Log in or Create an account to join the conversation.