PDA

View Full Version : Help with Warning cannot modify header location


LadyGem
11-15-2005, 05:48 PM
Hi my name is Lady Gem and I am new to php. I have written my first script but don't understand the warning I am receiving or how to fix it :-( Any help would be greatly appreciated.
Here is the actual warning when I test it:
Warning: Cannot modify header information - headers already sent by (output started at /home/jade67/public_html/contact.php:3) in /home/jade67/public_html/contact.php on line 19

I am attaching the php if I may as it is a tad long it is in zip format.

Any help is greatly appreciated.

Lady Gem

gsnedders
11-15-2005, 06:25 PM
You cannot send anything to the browser before running header(), including the whitespace here:
<?php /* Created on 11/08/2005 by webmaster@lady-gem.com */?>

<?

It'd be best just to have:
<?php
/* Created on 11/08/2005 by webmaster@lady-gem.com */

$name = $_REQUEST['name']; /*required*/
$email = $_REQUEST['email']; /*required*/
$url = $_REQUEST['url']; /*required*/

LadyGem
11-15-2005, 07:50 PM
Hi there,
Thank you for this answer and I will give it a try.

LG

LadyGem
11-15-2005, 08:05 PM
Thank you so much and it worked :-)

Yippeeeeee :-)

LG