Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Php mail send problem
FireMan
post
Post #1





Grupa: Zarejestrowani
Postów: 59
Pomógł: 0
Dołączył: 4.10.2008
Skąd: Małopolska

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


  1. <b><html>
  2.  <head>
  3.  <title>
  4.  PHP mail send
  5.  </title>
  6.  </head>
  7.  <body>
  8.  <form action=go.php method=POST>
  9.  Temat<input type=text name=temat><br/>
  10.  Tresc<input type=text name=tresc><br/></center>
  11.  <input type=submit value=Go><p>
  12.  
  13.  <?php
  14.  
  15.  $temat= $_POST['temat'];
  16.  $tresc = $_POST['tresc'];
  17.  
  18.  $to = "xxxxxx@interia.pl";
  19.  $subject = $temat;
  20.  $body = $tresc;
  21.  if (mail($to, $subject, $body)) {
  22.    echo("<p>OK</p>");
  23.   } else {
  24.    echo("<p>Zle</p>");
  25.   }
  26.  ?>
  27.  </body>
  28.  </html></b>



Oto kod skryptu. Problem w tym ze jad dam button Go to dostaje maila ale bez treści i tematu i od daty servera np jak strona na yoyo to dostaje puste od data@cba.pl. Może trzeba dodać jeszcze jedno pole textowe na wpisanie emaila goscia co to wysyła ? a jak tak to to jest From co nie ?

Ten post edytował FireMan 16.10.2008, 15:10:52
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Zmorcia
post
Post #2





Grupa: Zarejestrowani
Postów: 234
Pomógł: 5
Dołączył: 26.01.2008
Skąd: Lutcza

Ostrzeżenie: (20%)
X----


<b><html>
<head>
<title>
PHP mail send
</title>
</head>
<body>
<form action='go.php' method='POST'>
Temat<input type='text' name='temat'><br/>
Tresc<input type='text' name='tresc'><br/></center>
<input type='submit' value='Go'><p>

  1. <?php
  2. $temat= $_POST['temat'];
  3.  $tresc = $_POST['tresc'];
  4.  
  5.  $to = &#092;"xxxxxx@interia.pl\";
  6.  
  7.  if (mail($to, $temat, $tresc)) {
  8.    echo(&#092;"OK
  9.  
  10. &#092;");
  11.   } else {
  12.    echo(&#092;"Zle
  13.  
  14. &#092;");
  15.   }
  16.  ?>


Ten post edytował Zmorcia 16.10.2008, 18:35:14
Go to the top of the page
+Quote Post

Posty w temacie


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: 28.12.2025 - 14:54