|
-
May 16th, 2005, 02:27 PM
#1
Thread Starter
PowerPoster
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.
-
May 16th, 2005, 02:40 PM
#2
Re: Header location = variable
 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
-
May 16th, 2005, 02:42 PM
#3
Thread Starter
PowerPoster
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!
-
May 16th, 2005, 02:42 PM
#4
Fanatic Member
Re: Header location = variable
PHP Code:
<?php
header("Location: http://" . $ipath);
?>
does that work?
-
May 16th, 2005, 02:43 PM
#5
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|