Problém s PHP/html formulářem...
Napsal: sob 11. lis 2006, 01:29
Cus... mam tu takovy problem... jsem v PHP uplny MAX zacatecnik, a tenhle kod jsem sestavil tak, ze jsem jeho kusy odkoukal na ruznych strankach a pak to nejak splacal dohromady.... samozrejme, ze mi to nejde... tady je ten kod:
když z HTML stranky vyvolam tenhle kod, tak mi to furt hlasi chyby na radku $send_contact=mail($to,$subject,$message,$header);, tak se chci zeptat co mam spatne? na tomhle radku potrebuji vyvolat akci ktera ten email odesle, tak dekuju za rady....
Kód: Vybrat vše
<?php
$subject ="Poptávka IaM";
$message="$detail, $telefon, $customer_mail";
$thankyou="thankyou.html";
$error="error.html";
$mail_from="$customer_mail";
$header="from: $name <$mail_from>";
$noemail="noemail.html";
$noname="noname.html";
$notel="notel.html";
$nodetails="nodetails.html";
$to ='pabos@centrum.cz';
if($customer_mail == ""){
?>
<meta http-equiv="refresh" content="0; url=<?echo $noemail;?>"">
"<?php
;}elseif($detail == ""){
?>
<meta http-equiv="refresh" content="0; url=<?echo $nodetails;?>"">
"<?php
;}elseif($name == ""){
?>
<meta http-equiv="refresh" content="0; url=<?echo $noname;?>"">
"<?php
;}elseif($telefon == ""){
?>
<meta http-equiv="refresh" content="0; url=<?echo $notel;?>"">
"<?php
;}else{
$send_contact=mail($to,$subject,$message,$header);
?>
<meta http-equiv="refresh" content="0; url=<?echo $thankyou;?>"">
"<?php
}
"?>