FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Header and if statement
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Header and if statement [message #179448] Mon, 29 October 2012 08:36 Go to previous message
Bo Wisn is currently offline  Bo Wisn
Messages: 1
Registered: October 2012
Karma:
Junior Member
Hi,

I want to redirect to one page if $typ=0 and another page if $typ=1. I'm
trying this code:

if ($typ == 0) {
header ("Location:page1.php");
} else {
header ("Location:page2.php");
}

But undepending on the value of $typ it redirects to page1.php. Why?

/ Bo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Happy New Year
Next Topic: does the php is not popular?i am a phper?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 03:57:31 GMT 2024

Total time taken to generate the page: 0.04496 seconds