Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Formularz, skrypt który nie przenosi na dalsze strony
petrees
post 4.10.2009, 22:36:43
Post #1





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

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


  1.  
  2. <?php
  3. if(isset($_POST['email']))
  4. {
  5. $adresat = 'cos@cos.com';
  6.  
  7. $content .= 'Name: '.$_POST['imie']."\r\n";
  8. $content .= 'Email: '.$_POST['email']."\r\n";
  9. $content .= 'Phone: '.$_POST['phone']."\r\n";
  10. $content .= 'Deadline: '.$_POST['deadline']."\r\n";
  11. $content .= 'Message: '.$_POST['content']."\r\n";
  12.  
  13.  
  14. $header = "From: ktos@serwer.pl \nContent-Type:".
  15. ' text/plain;charset="iso-8859-2"'.
  16. "\nContent-Transfer-Encoding: 8bit";
  17. if (mail($adresat, 'List ze strony', $content, $header))
  18. header("location :../send.html");
  19. else
  20. header("location :../nosend.html");
  21. }
  22. ?>

  1. <table align="center">
  2. <tr>
  3. <td align="right"><label for="imie"><span class="style6">Imię:</span></label>
  4. <input type="text" size="35" name="imie"/></td>
  5. </tr>
  6. <tr>
  7. <td align="right"><label for="email"><span class="style6">Email:</span></label><input type="text" size="35" name="email"/></td>
  8. </tr>
  9. <tr>
  10. <td align="right"><label for="phone"><span class="style6">Telefon:</span></label>
  11. <input type="text" size="35" name="phone"/></td>
  12. </tr>
  13.  
  14. <tr>
  15. <td align="right"><label for="imie"><span class="style6">Termin:</span></label>
  16. <input type="text" size="35" name="deadline"/></td>
  17. </tr>
  18. <tr>
  19. <td align="right"><label for="content"></label><textarea name="content" cols="28" rows="6"></textarea></td>
  20. </tr>
  21. <tr>
  22. <td align="right"><input type="submit" value="Wyślij" /></td>
  23. </tr>
  24.  
  25. </table>

Go to the top of the page
+Quote Post
Burned
post 5.10.2009, 00:03:37
Post #2





Grupa: Zarejestrowani
Postów: 67
Pomógł: 8
Dołączył: 19.05.2004
Skąd: Warszawa

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


Na sam początek:
  1. error_reportint(E_ALL);

i pewnie wszystko sam będziesz potem wiedział.
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 6.07.2025 - 12:45