Two header("Location: ")... in one page...
Moderator: General Moderators
Two header("Location: ")... in one page...
I've had trouble with having two header("Location: ") 's on the same page... is there some way to make it work?
-
superwormy
- Forum Commoner
- Posts: 67
- Joined: Fri Oct 04, 2002 9:25 am
- Location: CT
Daven is wrong, you can have multiple calls to header() in teh same page.
BUT, if you try and set the same HTTP-HEADER twice, the first just gets overwritten.
Think about it, how are you going to tell a browser that your file is at both http://www.domainname1.com/index.htm AND http://www.domainname2.com/file.htm, or that a file the browser is downloading is BOTH a JPEG AND A GIF file? It's impossible.
What are you trying to accomplish? Why do you want to send them to two different locations?
BUT, if you try and set the same HTTP-HEADER twice, the first just gets overwritten.
Think about it, how are you going to tell a browser that your file is at both http://www.domainname1.com/index.htm AND http://www.domainname2.com/file.htm, or that a file the browser is downloading is BOTH a JPEG AND A GIF file? It's impossible.
What are you trying to accomplish? Why do you want to send them to two different locations?
-
martincrumlish
- Forum Newbie
- Posts: 13
- Joined: Mon Oct 14, 2002 10:46 am