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

PHP - headers Already Sent Error

Participant ,
Jul 28, 2006 Jul 28, 2006

Copy link to clipboard

Copied

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

Views

305
Translate

Report

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

Copy link to clipboard

Copied

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/

Votes

Translate

Report

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

Copy link to clipboard

Copied

Thanks David,

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

Cheers


Dave

Votes

Translate

Report

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

Copy link to clipboard

Copied

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/

Votes

Translate

Report

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