PDA

View Full Version : header('Location: .... etc.... in PHP



Daniel Hollands
January 31st, 2001, 13:47
if ( $info[check_chapter] == "" )
{
header('Location: http://writeoutthere.com/insert.php');
}

The above is the code i'm using to make a page redirect if a requirement is not meet, eg.. $info[chapter_check].

I'm trying to add some variables to the end of the URL posted so that the server will see somthing like:


http://writeoutthere.com/view?story_no=$info[story_no]&chapter_no=$info[chapter_no]

I want the information contained in the two variables to be displayed, but I don't know how.

Please help.

Woofcat
January 31st, 2001, 14:38
header('Location: http://writeoutthere.com/view.php?story_no='.$info['story_no'].'&chapter_no='.$info['chapter_no']);