0
Community Beginner
,
/t5/dreamweaver-discussions/redirection-using-header-not-working/td-p/390674
Nov 27, 2007
Nov 27, 2007
Copy link to clipboard
Copied
Hi,
I've created a simple insert page and after insert i want it to be redirected to another page which has list of entries.
Somehow the header redirection is not working. I tried site relative name in the after insert go to option and then gave tried the full path name but no relief. I tried the redirect at the top of the page(plain redirection as soon as the page is loaded) and it worked. I have attached the code. Can some one spot what am i missing here?
I've created a simple insert page and after insert i want it to be redirected to another page which has list of entries.
Somehow the header redirection is not working. I tried site relative name in the after insert go to option and then gave tried the full path name but no relief. I tried the redirect at the top of the page(plain redirection as soon as the page is loaded) and it worked. I have attached the code. Can some one spot what am i missing here?
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Beginner
,
Dec 05, 2007
Dec 05, 2007
I finally had time to work on this. The header already sent
was solved by including the contents of the file my_db.php instead
directly in the file. Somehow a white space crops up when virtual
is used..
LEGEND
,
/t5/dreamweaver-discussions/redirection-using-header-not-working/m-p/390675#M184161
Nov 27, 2007
Nov 27, 2007
Copy link to clipboard
Copied
.oO(Vijaikumar Ramasamy)
> I've created a simple insert page and after insert i want it to be redirected
>to another page which has list of entries.
> Somehow the header redirection is not working.
What does "not working" mean? What result do you get? Any error message?
A blank page?
>I tried site relative name in
>the after insert go to option and then gave tried the full path name but no
>relief.
The URL for the redirect must be absolute, not relative.
>I tried the redirect at the top of the page(plain redirection as soon
>as the page is loaded) and it worked. I have attached the code. Can some one
>spot what am i missing here?
One thing would be to add an exit() after the header() call to ensure
that the script stops there.
Micha
> I've created a simple insert page and after insert i want it to be redirected
>to another page which has list of entries.
> Somehow the header redirection is not working.
What does "not working" mean? What result do you get? Any error message?
A blank page?
>I tried site relative name in
>the after insert go to option and then gave tried the full path name but no
>relief.
The URL for the redirect must be absolute, not relative.
>I tried the redirect at the top of the page(plain redirection as soon
>as the page is loaded) and it worked. I have attached the code. Can some one
>spot what am i missing here?
One thing would be to add an exit() after the header() call to ensure
that the script stops there.
Micha
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Vijaikumar Ramasamy
AUTHOR
Community Beginner
,
/t5/dreamweaver-discussions/redirection-using-header-not-working/m-p/390676#M184162
Nov 27, 2007
Nov 27, 2007
Copy link to clipboard
Copied
The page is not redirected it stays in the same page after
the insert action.
the page is in the location << http://localhost/mysite/create_blog_entry.php?>>
after the submit form it should be redirected to the << http://localhost/mysite/blog_view.php>>--expected result
but the result is
<< http://localhost/mysite/create_blog_entry.php?>>
I tried the exit function after the header and i got connection reset error..
<<The connection to the server was reset while the page was loading.>>
the page is in the location << http://localhost/mysite/create_blog_entry.php?>>
after the submit form it should be redirected to the << http://localhost/mysite/blog_view.php>>--expected result
but the result is
<< http://localhost/mysite/create_blog_entry.php?>>
I tried the exit function after the header and i got connection reset error..
<<The connection to the server was reset while the page was loading.>>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/redirection-using-header-not-working/m-p/390677#M184163
Nov 27, 2007
Nov 27, 2007
Copy link to clipboard
Copied
Vijaikumar Ramasamy wrote:
> Somehow the header redirection is not working.
The most common problem with PHP failing to redirect a page is the
"headers already sent" error. It's frequently caused by an extra blank
line in an include file. Make sure there is no space or extra lines
before the opening PHP tag. Also check the include file (my_db.php) to
make sure there is no blank space or extra lines before the opening PHP
tag and after the closing PHP tag.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
> Somehow the header redirection is not working.
The most common problem with PHP failing to redirect a page is the
"headers already sent" error. It's frequently caused by an extra blank
line in an include file. Make sure there is no space or extra lines
before the opening PHP tag. Also check the include file (my_db.php) to
make sure there is no blank space or extra lines before the opening PHP
tag and after the closing PHP tag.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Beginner
,
/t5/dreamweaver-discussions/redirection-using-header-not-working/m-p/390678#M184164
Dec 05, 2007
Dec 05, 2007
Copy link to clipboard
Copied
I finally had time to work on this. The header already sent
was solved by including the contents of the file my_db.php instead
directly in the file. Somehow a white space crops up when virtual
is used..
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/redirection-using-header-not-working/m-p/390679#M184166
Dec 05, 2007
Dec 05, 2007
Copy link to clipboard
Copied
Vijaikumar Ramasamy wrote:
> I finally had time to work on this. The header already sent was solved by
> including the contents of the file my_db.php instead directly in the file.
> Somehow a white space crops up when virtual is used..
Your solution definitely works, which is the main thing. However,
virtual() won't insert whitespace unless it already exists.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
> I finally had time to work on this. The header already sent was solved by
> including the contents of the file my_db.php instead directly in the file.
> Somehow a white space crops up when virtual is used..
Your solution definitely works, which is the main thing. However,
virtual() won't insert whitespace unless it already exists.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

