Witam.
Po przesłaniu e-maila za pomocą formularza w html i skryptu Easiest Form2Mail pojawiają się krzaczki.
Jak należy ustawic formatowanie formularza?
czy w pliku z formularzem, czy w pliku srkyptu form2mail?
FORMULARZ:
<form method="post" action="kontakt.php"> <table align="center" bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="0" width="500">
<table align="center" border="0" cellpadding="3" cellspacing="1" width="600">
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Imię i nazwisko:
</font></td>
<td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <input size="50" name="name" id="name">
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw
ój adres e-mail:
</font></td>
<td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw
ój numer telefonu:
</font></td>
<td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <input size="50" name="telefon" id="telefon"> </font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sw
ój numer gg
</font></td>
<td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Preferujesz kontakt:
</font></td>
<td align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <label> <input name="preferowany_kontakt" value="email" type="radio"> e-mail
</label> <label> <input name="preferowany_kontakt" value="telefon" type="radio"> telefon
</label>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Podaj sprawe, w jakiej piszesz:
</font></td>
<td align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <input size="50" name="sprawa" id="sprawa"> </font></td>
<td colspan="2" align="center"><textarea name="message" cols="65" rows="5" id="message"></textarea><br><input name="Submit" value="Wyslij na adres ziko56@o2.pl" type="submit"></td>
SKRYPT kontakt.php
<?php
# You can use this script to submit your forms or to receive orders by email.
$MailToAddress = "pawel.dabrowski1@interia.pl"; // your email address
$redirectURL = "http://www.web4future.com/thankyou.htm"; // the URL of the thank you page.
# optional settings
$MailSubject = "[Message from the contact form]"; // the subject of the email
$MailToCC = ""; // CC (carbon copy) also send the email to this address (leave empty if you don't use it)
# in the $MailToCC field you can have more then one e-mail address like "a@yoursite.com, b@yoursite.com, c@yoursite.com"
# If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
# If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
# If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
# you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
# you have to do the same with checkboxes
# This script was written by George A. & Calin S. from Web4Future.com
# There are no copyrights in the sent emails.
# SPAMASSASSIN RATING: 0.4
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
# ver. 1.6.2
if (preg_match ("/".$_SERVER["SERVER_NAME"]."/i", $_SERVER["HTTP_REFERER"])) { $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body>";
while(list
($key, $val) = each($_GET)) { $GLOBALS[$key] = $val;
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "<br>";
}
else {
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: - <br>"; }
else { $w4fMessage .= "<b>$key:</b> $val<br>"; }
}
}
} // end while
}//end if
else {
while(list
($key, $val) = each($_POST)) { $GLOBALS[$key] = $val;
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "<br>";
}
else {
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: - <br>"; }
else { $w4fMessage .= "<b>$key:</b> $val<br>"; }
}
}
} // end while
}//end else
$w4fMessage = "<font face=verdana size=2>".$w4fMessage."</font></body></html>";
if (!$email) {$email = "server@site.com";}
if (!mail($MailToAddress, $MailSubject, $w4fMessage, "From: $name <$email>\r\nReply-To: $name <$email>\r\nMessage-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\nMIME-Version: 1.0\r\nX-Priority: 3\r\nX-Mailer: PHP/" . phpversion()."\r\nX-MimeOLE: Produced By Web4Future Easiest Form2Mail v1.5\r\nBCc: $MailToCC\r\nContent-Type: text/html; charset=ISO-8859-1\r\nContent-Transfer-Encoding: 8bit\r\n")) { echo "Error sending e-mail!";} else { header("Location: ".$redirectURL); } } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";} ?>
PILNE.
Na stronie potrzebuję dwóch formularzy:
- dział kontakt
- dział zamów kurs
Jest to strona dla OSK.
Drugie pytanie: w jaki sposób najlepiej wstawic formularz na stronę. CMS: Quick.cms
Ten post edytował Pawel.Dabrowski 21.08.2012, 07:49:12