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
Re: Header and if statement [message #179449 is a reply to message #179448] Mon, 29 October 2012 08:47 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Mon, 29 Oct 2012 09:36:53 +0100, Bo Wisén wrote:

> 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?

Is $typ an integer? Is $typ even defined? You haven't included the line
that assigns a value to $typ.

Rgds

Denis McMahon
[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: Thu Sep 19 21:48:49 GMT 2024

Total time taken to generate the page: 0.04748 seconds