/ Forside / Teknologi / Udvikling / HTML / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
HTML
#NavnPoint
molokyle 11184
Klaudi 5506
bentjuul 3377
severino 2040
smorch 1950
strarup 1525
natmaden 1396
scootergr.. 1320
e.c 1150
10  miritdk 1110
return page is not working
Fra : joh@yahoo.com


Dato : 03-02-03 14:13

Hi

I am having a major problem finding solution for this issuse of mine. I have
formmail.php file. Which is also in the same forlde where all my files are.
When a user fill in the form and press the send button. Then there should be
a page forwarded to user saying Thank you for enquire. But instead I receive
this message
"
Warning: Cannot add header information - headers already sent by (output
started at /var/www/m-d-a.dk/public_html/formmail.php:1) in
/var/www/m-d-a.dk/public_html/formmail.php on line 30
"
AND MY formmail.php code is as below:-

<?php

function sendmail()
{
if ($_POST["modtager"] && $_POST["okside"]) {
$recipient = $_POST["modtager"];
$subject = "E-mail fra m-d-a.dk";
$message .=
"------------------------------------------------\n\n";
foreach ($_POST as $name => $value) {
if ($name != "modtager" && $name !=
"okside") {
$message .= $name . ": ";
if (is_array($_POST[$name])) {
foreach ($_POST[$name] as
$value) {
$message .= $value .
", ";
}
} else {
$message .= $value;
}
$message .= "\n";
}
}
$message .=
"------------------------------------------------\n\n";
mail($recipient,$subject,$message,$headers);
$int_ok = 1;
}
return ($int_ok);
}

if (sendmail() == 1) {
header("location: ". $_POST["okside"] ."");
} else {
?>
<html>
<head>
<title></title>
</head>
<body>

<div style="text-align: center; font-size: 18px; font-weight: bold">
Formularen er ikke sat korrekt op. Hidden-felterne "modtager" og "okside"
mangler!
</div>

</body>
</html>

<?

}

?>

I would appreciate if you could give me your support.

/Jo




 
 
Jens Gyldenkærne Cla~ (03-02-2003)
Kommentar
Fra : Jens Gyldenkærne Cla~


Dato : 03-02-03 14:41

joh@yahoo.com skrev:

> Warning: Cannot add header information - headers already sent
> by (output started at
> /var/www/m-d-a.dk/public_html/formmail.php:1) in
> /var/www/m-d-a.dk/public_html/formmail.php on line 30 "

Try to ask your question in a group regarding php - header problems
are usually not related to the html source.

I guess the problem is the same as the one described here (in
Danish): <http://asp-faq.dk/article/?id=48>, but the solition is
specific to your server language - that is php.    

Answers to this message should be placed in the group
<news:dk.edb.internet.webdesign.serverside.php> (which I don't
follow) - if one is using a usenet client it should happen
automatically with follow-up.

FUT: dk.edb.internet.webdesign.serverside.php (formal description
of the follow-up)
--
Jens Gyldenkærne Clausen
Svar venligst under det du citerer, og citer kun det der er
nødvendigt for at forstå dit svar i sammenhængen. Se hvorfor og
hvordan på http://usenet.dk/netikette/citatteknik.html

Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408868
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste