Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: PHP - formularz do wysyłania maila ze strony
Forum PHP.pl > Forum > Przedszkole
tomas.rosicky
Witam

potrzebuje na szybko pomocy. w którym miejscu poniżej należy
zdefiniować adres email (np: janek@mail.pl), na który będzie
wysyłany formualrz? Teraz wpisany jest on w dwoch miejscach, ale
niestety maile nie dochodzą. Dodam że po klinięciu na send - pojawia
się komunikat "form was successfully sent!" - maile jednak nie doc
ierają.
prosze o rade.dzieki!



<?php
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!="janek@mail.pl") {
$pre_array=split ("&777&", $request);

$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]
*>/", "", $pre_array[0]);
$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]
*>/", "", $pre_array[1]);
}
next($_REQUEST);
}



reset($post_vars);


$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!
="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess
[1]."</strong> ".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST["janek@mail.pl"], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("form was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>
potreb
Zastosuj najpier bbcode.
-tomas.rosicky-
Kod
<?php
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!="janek@mail.pl") {
$pre_array=split ("&777&", $request);

$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]
*>/", "", $pre_array[0]);
$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]
*>/", "", $pre_array[1]);
}
next($_REQUEST);
}



reset($post_vars);


$subject="From ".$post_vars['your_name'][0];
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!
="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess
[1]."</strong> ".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST["janek@mail.pl"], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("form was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>
potreb
  1. <?php
  2. mail("janek@mail.pl", $subject, "
  3. ?>
Zen Vantalye
Prawdopodobnie ci sie przyda http://www.jaktozrobic.az.pl/2007/12/28/phpjak-wyslac-maila/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.