Results 1 to 5 of 5

Thread: Header location = variable [ fixed]

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Resolved Header location = variable [ fixed]

    i'm trying to send the user to a page stored in a variable,

    How do i do it?

    PHP Code:
    header('Location: '$ipath'.');
    header('Location: '$ipath'); 
    i cant get it to work, the above 2 will not work, how can i do this?
    Last edited by Pino; May 16th, 2005 at 02:43 PM.

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Header location = variable

    Quote Originally Posted by Pino
    i'm trying to send the user to a page stored in a variable,

    How do i do it?

    PHP Code:
    header('Location: '$ipath'.');
    header('Location: '$ipath'); 
    i cant get it to work, the above 2 will not work, how can i do this?
    If you use double quotes variables inside them will be executed

    PHP Code:
    header("Location: $ipath"); 
    Or, if you want to use the single ones:

    PHP Code:
    header('Location: ' $ipath); 
    Just remember the dot opperator (.) is to PHP what the amperstand (&) is to VB

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Header location = variable

    cheers bud, i managed to fix it before i looked at your reply, i'm rushing trying to get this project done so i can get paid tommorow and making silly mistakes thanks for the help!

  4. #4
    Fanatic Member ALL's Avatar
    Join Date
    Jul 2004
    Location
    192.168.1.1
    Posts
    711

    Re: Header location = variable

    PHP Code:
    <?php
    header
    ("Location: http://" $ipath);
    ?>
    does that work?
    Please support one of my projects?
    TKForums.com

    Web Forum
    JavaScript Wiki
    ________________________
    If somone helps you, please rate their post, by clicking the to rate their post

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Header location = variable

    All, the path contained the http etc, it was quotes were well out thanks anyhows

Posting Permissions

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



Click Here to Expand Forum to Full Width