![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 16.12.2007 Ostrzeżenie: (0%) ![]() ![]() |
WITAM m mam problem. Borykam sie juz ze 2 tyg. szukam na forach ale nic z tego. Prosze o pomoc. Chciałem załadowac prosty - formularz email. składa sie z 3 plików php.
contactscript.php Kod <?php // headers for the email listed below $headers .= "From: $name <$email>\n"; // your email client will show the person's email address like normal $headers .= "Content-Type: text/plain; charset=iso-8859-1\n"; // sets the mime type $recipient = "mojemail@o2.pl"; // enter YOUR email address here $subject = "Contact From Your Website"; // this is the subject of the email $msg = wordwrap( $msg, 1024 ); mail($recipient, $subject, stripslashes($msg), $headers); // the mail() function sends the message to you //Once the data is entered, redirect the user to give them visual confirmation header("location: thanks.php"); ?> form.php Kod <form name="form" method="post" action="contactscript.php"> <table width="400" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="200" valign="top" align="right">Your Name: </td> <td width="200" valign="top" align="left"> <input type="text" name="name" size="25" maxlength="200" /> </td> </tr> <tr> <td width="200" valign="top" align="right">Your Email:</td> <td width="200" valign="top" align="left"> <input type="text" name="email" size="25" maxlength="100" /> </td> </tr> <tr> <td width="200" valign="top" align="right">Your Comments: </td> <td width="200" valign="top" align="left"> <textarea name="msg" cols="25" rows="4"></textarea> </td> </tr> <tr> <td width="200" valign="top"> </td> <td width="200" valign="top" align="left"> <input type="reset" name="Reset" value="Reset" /> <input type="submit" name="Submit" value="Submit" /> </td> </tr> </table> </form> i prosta "dummy page" (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) thanks.php Kod <h1>Thanks!</h1> <p> If you made it here, it means we've gotten your email. Someone will be in contact with you shortly. Thanks!</p> Wszystko działa emaile wysylaja sie na mojego maila tylko ze sa puste. Nie maja ani nadawcy ani tresci. Poprostu nic. Przychodzi pusty mail. Na prawde nie wiem jak mam to naprawi i PROSZE Was o pomoc. Probowlaem juz wszystkich dostepnych formularzy ale nic. SERIO NIE MAM POJECIA CO ZROBIC. JUZ 2 TYG NAD TYM SIEDZE ALE NIE MAM POMYSLU. dZIEKUJE SERDECZNIE |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 129 Pomógł: 2 Dołączył: 17.01.2005 Ostrzeżenie: (0%) ![]() ![]() |
Musisz zapamietac ze wszytsko co wyślesz formularzem (tj wszelkie dane) znajdują sie najcześćiej albo w zmiennej $_GET albo $_POST. A PHPowi musisz dokładnie wskazać jakie dane ma wybrać. $_POST['pole'] wskazuje na wartosć elementu formularza o nazwie "pole" (w wypadku gdy forumalrz został wysłany za pomoca post, tj. arhument method="post" w tagu <form>).
Ten post edytował Luke_Star 16.12.2007, 18:35:31 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.10.2025 - 15:04 |