![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 96 Pomógł: 0 Dołączył: 19.10.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Dopiero od niedawna próbuje swoich sił w php, html, i C++ więc pojawił się problem na mojej drodze (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) A dokładnie mój nauczyciel informatyki nie był w stanie zrobić formularza w php więc ja sie za to zbrałem lecz mój formularz wysyła tylko połowe danych :/ Tzn. Graficznie jest ok, wysyła maila ale z nie pełnymi danymi (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) Problem 2 jeżeli chodzi o wysyłanie tekstu w formularzu to coś tam daje rade ale żeby wysłać coś takiego to już mam problem (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) <br/><B/>C. Poziom konkursu: Prosze zaznaczyc wybrane poziomy, w których szkola zamierza wziasc udzial<br/><B/> <p><input type="checkbox" name="C1" value="ON"> Click on Starters <input type="checkbox" name="C2" value="ON"> Click on Movers <input type="checkbox" name="C3" value="ON"> Click on Flyers</p> <p><input type="checkbox" name="C4" value="ON"> Click on 1 <input type="checkbox" name="C5" value="ON"> Click on 2 <input type="checkbox" name="C6" value="ON"> Click on 3 <input type="checkbox" name="C7" value="ON"> Click on 4</p> <p> </p> Jak możecie powiedzcie mi jak zrobić żeby to też zawierał list z formularza (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Tutaj cały kod który napisałem : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Zgloszenie udzialu w konkursie "Clickonmaniac"</title> </head> <body> <div align=center> <h3>Zgloszenie udzialu w konkursie "Clickonmaniac"</h3> <?php $gesendet = $_POST['gesendet']; $imie = $_POST['imie']; $nazwisko = $_POST['nazwisko']; $nazwa = $_POST['nazwa szkoly']; $email = $_POST['email']; $nr = $_POST['nr.telefonu']; $ul = $_POST['ulica i numer']; $kod = $_POST['kod pocztowy']; $miasto = $_POST['miasto']; $nr2 = $_POST['nr.telefonu']; if ($gesendet == "Wyslij") { # Ihre E-Mail-Adresse $an ="maniek1992-1992@o2.pl"; # Diese Nachricht wird an Ihre E-Mail-Adresse gesendet $text ="Witaj,\n Napisal: $imie $nazwisko \n\n ====\n $imie\n==== ====\n $nazwisko\n==== ====\n $nazwa\n==== ====\n $email\n==== ====\n $nr\n==== ====\n $ul\n==== ====\n $kod\n==== ====\n $miasto\n==== ====\n $nr2\n====\n\nSie können $imie $nazwisko unter dieser $email erreichen."; mail($an,$betreff,$text,"From: ".$email); echo "Wiadomosc zostala wyslana"; } else { ?> <script type="text/javascript"> function eingaben_ueberpruefen(){ var mail = document.Formular.email.value; if (document.Formular.imie.value.length < 1){ alert("Sie haben noch keinen Imie eingegeben!") document.Formular.imie.focus(); return false; } else if (document.Formular.nazwisko.value.length < 1){ alert("Bitte geben Sie Ihren Nazwisko ein"); document.Formular.nazwisko.focus(); return false; } else if (mail.length < 3 || mail.indexOf ('@',0) == -1 || mail.indexOf ('.',0) == -1){ alert("Bitte geben Sie eine gültige E-Mail-Adresse ein.") document.Formular.email.select(); return false; } else if (document.Formular.nazwa.value.length < 1){ alert("Bitte geben Sie einen Nazwa Szkoły ein!") document.Formular.nazwa.focus(); return false; } else if (document.Formular.nr.value.length < 1){ alert("Bitte geben Sie eine Nachricht ein!") document.Formular.nr.focus(); return false; } else if (document.Formular.ul.value.length < 1){ alert("Bitte geben Sie eine Nachricht ein!") document.Formular.ul.focus(); return false; } else if (document.Formular.kod.value.length < 1){ alert("Bitte geben Sie eine Nachricht ein!") document.Formular.kod.focus(); return false; } else if (document.Formular.miasto.value.length < 1){ alert("Bitte geben Sie eine Nachricht ein!") document.Formular.miasto.focus(); return false; } else if (document.Formular.nr2.value.length < 1){ alert("Bitte geben Sie eine Nachricht ein!") document.Formular.nr2.focus(); return false; } else return true; } </script> <form name="Formular" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" onSubmit="return eingaben_ueberpruefen();"> <table cellPadding=5 cellSpacing=5 border=5> <tr> <br/><B/>A. Dane szkoly:<br/><B/> <td><b>Nazwa szkoly:</b></td> <td><input type="text" name="nazwa" size="35" maxlength="40"></td> </tr> <tr> <td><b>Ulica i numer:</b></td> <td><input type="text" name="ul" size="35" maxlength="40"></td> </tr> <td><b>Kod pocztowy:</b></td> <td><input type="text" name="kod" size="35" maxlength="40"></td> </tr> <td><b>Miasto:</b></td> <td><input type="text" name="miasto" size="35" maxlength="40"></td> </tr> <td><b>Nr.Telefonu:</b></td> <td><input type="text" name="nr2" size="45" maxlength="60"></td> <tr> <form name="Formular" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" onSubmit="return eingaben_ueberpruefen();"> <table cellPadding=5 cellSpacing=5 border=5> <tr> <br/><B/>B. Dane nauczyciela koordynujacego:<br/><B/> <td><b>Imie:</b></td> <td><input type="text" name="imie" size="35" maxlength="40"></td> </tr> <tr> <td><b>Nazwisko:</b></td> <td><input type="text" name="nazwisko" size="35" maxlength="40"></td> </tr> <tr> <td><b>E-Mail:</b></td> <td><input type="text" name="email" size="35" maxlength="40"></td> </tr> <tr> <td><b>Nr.Telefonu:</b></td> <td><input type="text" name="nr2" size="45" maxlength="60"></td> <tr> <form name="Formular" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" onSubmit="return eingaben_ueberpruefen();"> <table cellPadding=5 cellSpacing=5 border=5> <tr> <br/><B/>C. Poziom konkursu: Prosze zaznaczyc wybrane poziomy, w których szkola zamierza wziasc udzial<br/><B/> <p><input type="checkbox" name="C1" value="ON"> Click on Starters <input type="checkbox" name="C2" value="ON"> Click on Movers <input type="checkbox" name="C3" value="ON"> Click on Flyers</p> <p><input type="checkbox" name="C4" value="ON"> Click on 1 <input type="checkbox" name="C5" value="ON"> Click on 2 <input type="checkbox" name="C6" value="ON"> Click on 3 <input type="checkbox" name="C7" value="ON"> Click on 4</p> <p> </p> <th colspan=2><br> <input type="submit" name="gesendet" value="Wyslij"> * <input type="reset"> </th> </tr> </table> </form> <?php } ?> </div> </body> </html> Jeżeli chcecie zobaczyć ten formularzyk to jest on na stronie clickonmaniac.republika.pl.. Z góry dzięki za pomoc bo musze to w poniedziałek oddać (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) Pozdrawiam, |
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.09.2025 - 18:43 |