/ 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 not working
Fra : joh@yahoo.com


Dato : 03-02-03 14:14

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




 
 
Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408849
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste