Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> PHP - formularz do wysyłania maila ze strony
tomas.rosicky
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 20.01.2008

Ostrzeżenie: (0%)
-----


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>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
potreb
post
Post #2





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Zastosuj najpier bbcode.

Ten post edytował potreb 20.01.2008, 09:54:58
Go to the top of the page
+Quote Post
--tomas.rosicky--
post
Post #3





Goście







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>
Go to the top of the page
+Quote Post
potreb
post
Post #4





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


  1. <?php
  2. mail("janek@mail.pl", $subject, "
  3. ?>


Ten post edytował potreb 20.01.2008, 09:54:04
Go to the top of the page
+Quote Post
Zen Vantalye
post
Post #5





Grupa: Zarejestrowani
Postów: 13
Pomógł: 1
Dołączył: 29.09.2007

Ostrzeżenie: (0%)
-----


Prawdopodobnie ci sie przyda http://www.jaktozrobic.az.pl/2007/12/28/phpjak-wyslac-maila/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 21:57