redirect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zoe Brown

    #1

    redirect

    Hello

    I am new to php but have done lots of asp and .net.

    How do I do redirect a page to a new page in php ???

    I am trying to use

    <?php

    ob_start();

    $username="bla" ;

    $password="blab la";

    if (($_POST['username']==$username) && ($_POST['password']==$password))

    {

    header("Locatio n: main.html");

    }

    ?>



    Thanks so much.


  • Jerry Stuckle

    #2
    Re: redirect

    Zoe Brown wrote:[color=blue]
    > Hello
    >
    > I am new to php but have done lots of asp and .net.
    >
    > How do I do redirect a page to a new page in php ???
    >
    > I am trying to use
    >
    > <?php
    >
    > ob_start();
    >
    > $username="bla" ;
    >
    > $password="blab la";
    >
    > if (($_POST['username']==$username) && ($_POST['password']==$password))
    >
    > {
    >
    > header("Locatio n: main.html");
    >
    > }
    >
    > ?>
    >
    >
    >
    > Thanks so much.
    >
    >[/color]

    It's hard telling. What kind of error are you getting?

    BTW - you shouldn't need the ob_start() call.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: redirect

      Zoe Brown wrote:[color=blue]
      > Hello
      >
      > I am new to php but have done lots of asp and .net.
      >
      > How do I do redirect a page to a new page in php ???[/color]
      <snip>

      These links might help:
      1. http://phplens.com/phpeverywhere/node/view/32
      2. http://asp2php.naken.cc/

      --
      <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

      Comment

      • Zoe Brown

        #4
        Re: redirect


        "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
        news:1129042563 .272525.86490@z 14g2000cwz.goog legroups.com...[color=blue]
        > Zoe Brown wrote:[color=green]
        >> Hello
        >>
        >> I am new to php but have done lots of asp and .net.
        >>
        >> How do I do redirect a page to a new page in php ???[/color]
        > <snip>
        >
        > These links might help:
        > 1. http://phplens.com/phpeverywhere/node/view/32
        > 2. http://asp2php.naken.cc/[/color]

        thanks, i opened up the file in notepad and saved as ansi and it worked.
        very stupid.


        Comment

        • Zoe Brown

          #5
          Re: redirect


          "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
          news:1129042563 .272525.86490@z 14g2000cwz.goog legroups.com...[color=blue]
          > Zoe Brown wrote:[color=green]
          >> Hello
          >>
          >> I am new to php but have done lots of asp and .net.
          >>
          >> How do I do redirect a page to a new page in php ???[/color]
          > <snip>
          >
          > These links might help:
          > 1. http://phplens.com/phpeverywhere/node/view/32
          > 2. http://asp2php.naken.cc/[/color]

          oh and these links are great !!!


          Comment

          Working...