how to go to a different page?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saumya
Forum Contributor
Posts: 193
Joined: Sun Jan 30, 2005 10:21 pm

how to go to a different page?

Post by saumya »

how can i send the users to another page from my php code.I use html headers to send them to different pages.But is it possible through php?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Code: Select all

header("Location: http://www.otherpage.com");
saumya
Forum Contributor
Posts: 193
Joined: Sun Jan 30, 2005 10:21 pm

Post by saumya »

thanks a lot buddy.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

if you can not get the header statement on top of the page with no blanks or echo stmts, it would be useful if you use this for time being.

Code: Select all

echo "<script>window.location=\"hello.php\"</script>"
Post Reply