Professional Web Applications Themes

open another page - PHP Development

hi everyone, i would like to know how to open another page, like: if ($i == 5) { open("sdrg.htm"); } else { open("tjhdfthdft.htm"); } thanks...

  1. #1

    Default open another page

    hi everyone,

    i would like to know how to open another page, like:

    if ($i == 5)
    {
    open("sdrg.htm");
    }
    else
    {
    open("tjhdfthdft.htm");
    }


    thanks
    toutnouveau@pour.php Guest

  2. #2

    Default Re: open another page

    <php> kirjoitti
    viestissä:43146c1d$0$17697$free.fr... 

    header('Location: http://www.your.domain/sdrg.htm');
     

    header('Location: http://www.your.domain/tjhdfthdft.htm');
     

    That should do it.

    --
    SETI Home - Donate your cpu's idle time to science.
    Further reading at <http://setiweb.ssl.berkeley.edu/>
    Kimmo Laine <com>


    Kimmo Guest

  3. #3

    Default Re: open another page

    Kimmo Laine a écrit : 
    >
    >
    > header('Location: http://www.your.domain/sdrg.htm');
    >

    >
    >
    > header('Location: http://www.your.domain/tjhdfthdft.htm');
    >

    >
    >
    > That should do it.
    >[/ref]

    thanks for your response, but that doesn't works.
    toutnouveau@pour.php Guest

  4. #4

    Default Re: open another page

    <php> kirjoitti
    viestissä:43149112$0$2963$free.fr... 
    >>
    >>
    >> header('Location: http://www.your.domain/sdrg.htm');
    >>
    >> 
    >>
    >>
    >> header('Location: http://www.your.domain/tjhdfthdft.htm');
    >>
    >> 
    >>
    >>
    >> That should do it.
    >>[/ref]
    >
    > thanks for your response, but that doesn't works.[/ref]

    Keep in mind, that no output must be sent before setting headers. I'm
    certain it would work, but you have something that outputs something before
    setting the header.

    This works:
    <?php
    header('Location: http://www.your.domain/tjhdfthdft.htm');
    ?>

    this won't work
    <?php
    echo "something something";
    header('Location: http://www.your.domain/tjhdfthdft.htm');
    ?>

    Make sure there is absolutely no output commands before setting the headers.
    Even a single space or a line break before the initial <?php tag is
    concidered output and thus headers can not be modified.

    It does work if you use it correctly.

    --
    SETI Home - Donate your cpu's idle time to science.
    Further reading at <http://setiweb.ssl.berkeley.edu/>
    Kimmo Laine <com>


    Kimmo Guest

  5. #5

    Default Re: open another page

    Kimmo Laine a écrit : 
    >>
    >>thanks for your response, but that doesn't works.[/ref]
    >
    >
    > Keep in mind, that no output must be sent before setting headers. I'm
    > certain it would work, but you have something that outputs something before
    > setting the header.
    >
    > This works:
    > <?php
    > header('Location: http://www.your.domain/tjhdfthdft.htm');
    > ?>
    >
    > this won't work
    > <?php
    > echo "something something";
    > header('Location: http://www.your.domain/tjhdfthdft.htm');
    > ?>
    >
    > Make sure there is absolutely no output commands before setting the headers.
    > Even a single space or a line break before the initial <?php tag is
    > concidered output and thus headers can not be modified.
    >
    > It does work if you use it correctly.
    >[/ref]
    yes, that works, now !
    thanks.
    toutnouveau@pour.php Guest

Similar Threads

  1. To open a page of a PDF
    By Telerín in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: April 24th, 11:26 AM
  2. .htm page open in .htm
    By sue_k in forum Macromedia Dynamic HTML
    Replies: 6
    Last Post: August 26th, 08:17 PM
  3. Open PDF to page x in VBA?
    By Pdxergreg in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: June 1st, 04:03 PM
  4. Can I open a page as a popup using GOTO DETAIL PAGE
    By Don Pacino in forum Dreamweaver AppDev
    Replies: 0
    Last Post: April 9th, 09:42 PM
  5. Open a page with php
    By Rick in forum PHP Development
    Replies: 3
    Last Post: November 8th, 10:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139