Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP - headers Already Sent Error

Participant ,
Jul 28, 2006 Jul 28, 2006
I Can't seem to get this page to redirect correctly after deleting a record. Whatever I do a always get the headers already sent error. I have looked but I can't find the reason. Can anyone hep (code attached)

Cheers

Dave
TOPICS
Server side applications
306
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jul 28, 2006 Jul 28, 2006
Thanks David,

I cut and pasted the PHP stuff above the head and everytihng works like a swiss watch.

Cheers


Dave
Translate
LEGEND ,
Jul 28, 2006 Jul 28, 2006
davecheet wrote:
> I Can't seem to get this page to redirect correctly after deleting a record.
> Whatever I do a always get the headers already sent error. I have looked but I
> can't find the reason. Can anyone hep (code attached)
>
> <head>
> <?php require_once('../Connections/con_op.php'); ?>

The fact that your PHP code is inside the head of the document is
causing the problem. *No* output must be sent to the browser before a
call to the PHP header() function.

Dreamweaver will not automatically place that code inside the head. It's
something you must have done yourself. If you understand PHP code, you
need to cut and paste it above the DOCTYPE. If you don't understand PHP
code, you would be better off trying to create the page from the start
again.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2006 Jul 28, 2006
Thanks David,

I cut and pasted the PHP stuff above the head and everytihng works like a swiss watch.

Cheers


Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 28, 2006 Jul 28, 2006
LATEST
davecheet wrote:
> Thanks David,
>
> I cut and pasted the PHP stuff above the head and everytihng works like a swiss watch.

Great. Glad you didn't need to start from scratch.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines