Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> wyslij strone znajomemu
this
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 3.10.2006

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


Witam potrzebuje skrypt ktory wysle strone na adres email, bede wdzieczny za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
lopik
post
Post #2





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 7.07.2006

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


Nie miałem co robić (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

Skrypt prosty. (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Ale działa (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

Ale reszte sobei chyba zrobisz sam, z pomocą np: manuala (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)


  1. <?php
  2. if (!empty($_POST['submit'])) {
  3.  
  4. if (!empty($_POST['email']) and (!empty($_POST['opis']))) {
  5.  
  6. if (ereg("^[^@]+@([a-z0-9-]+.)+[a-z]{2,4}$" , $_POST['email'])) {
  7.  
  8. mail($_POST['email'], "Wysyłam Ci ciekawego linka", $_POST['opis']);
  9. echo 'strona wyslana';
  10. }
  11. else {
  12. echo 'adres email jest nie poprawny'; }
  13. }
  14. else {
  15. echo 'nie wypełniłeś formularza'; }
  16.  
  17. }
  18.  else {
  19. ?>
  20. <form method="post" action="index.php">
  21. email: <input type="text" name="email" /><br />
  22. opis: <textarea name="opis" rows="4" cols="26"></textarea><br />
  23. <input type="submit" name="submit" value="wyslij!" />
  24. </form>
  25. <?php
  26. } 
  27. ?>


Ten post edytował pik 3.10.2006, 23:15:17
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: 14.10.2025 - 10:55