Здравейте! Съжалявам за невежеството но по принцип се занимавам само с уеб дизайн и не чаткам много php. Та имам един сайт в който контактната форма не работи и не знам как да я поправя за да тръгне(не съм я писал аз) сайта беше доста стар така че ако кода е много зле не се учудвайте.
Това е целия php код за формата. Благодаря за помощта предварително!
Код:
<?
if (isset($_POST["saction"]) and ($_POST["saction"] == '1'))
{
$mail .= "Name: " . $_POST["txtName"];
$mail .="\nAddress: " . $_POST["txtAddress"];
$mail .="\nCity: " . $_POST["txtCity"] . " State: ". $_POST["txtState"] . " ZipCode: " .$_POST["txtZip"];
$mail .="\nE-mail: " .$_POST["txtEmail"];
$mail .="\nPhone: " .$_POST["txtPhone"];
$mail .="\n\nInterior Design:";
if (isset($_POST["chBoxRemodeling"]))
$mail .="\n - " . $_POST["chBoxRemodeling"];
if (isset($_POST["chBoxBasements"]))
$mail .="\n" . $_POST["chBoxBasements"];
if (isset($_POST["chBoxBaths"]))
$mail .="\n" . $_POST["chBoxBaths"];
if (isset($_POST["chBoxVenetian"]))
$mail .="\n" . $_POST["chBoxVenetian"];
if (isset($_POST["chBoxFaux"]))
$mail .="\n" . $_POST["chBoxFaux"];
if (isset($_POST["chBoxMosaics"]))
$mail .="\n" . $_POST["chBoxMosaics"];
$mail .="\nSpecial Instructions:" . $_POST["txtInteriorDesign"];
$mail .="\n\nExterior Design:";
if (isset($_POST["chBoxLandscape"]))
$mail .="\n" . $_POST["chBoxLandscape"];
if (isset($_POST["chBoxDecks"]))
$mail .="\n" . $_POST["chBoxDecks"];
if (isset($_POST["chBoxWalls"]))
$mail .="\n" . $_POST["chBoxWalls"];
if (isset($_POST["chBoxPatios"]))
$mail .="\n" . $_POST["chBoxPatios"];
if (isset($_POST["chBoxWater"]))
$mail .="\n" . $_POST["chBoxWater"];
$mail .="\nSpecial Instructions:" . $_POST["txtExteriorDesign"];
$mail .="\n\nMaintenance Services Desired:";
if (isset($_POST["chBoxMowing"]))
$mail .="\n" . $_POST["chBoxMowing"];
if (isset($_POST["chBoxPruning"]))
$mail .="\n" . $_POST["chBoxPruning"];
if (isset($_POST["chBoxLeaf"]))
$mail .="\n" . $_POST["chBoxLeaf"];
if (isset($_POST["chBoxLawn"]))
$mail .="\n" . $_POST["chBoxLawn"];
if (isset($_POST["chBoxAeration"]))
$mail .="\n" . $_POST["chBoxAeration"];
if (isset($_POST["chBoxSodding"]))
$mail .="\n" . $_POST["chBoxSodding"];
if (isset($_POST["chBoxTree"]))
$mail .="\n" . $_POST["chBoxTree"];
if (isset($_POST["chBoxSeasonal"]))
$mail .="\n" . $_POST["chBoxSeasonal"];
if (isset($_POST["chBoxMulching"]))
$mail .="\n" . $_POST["chBoxMulching"];
$mail .="\nSpecial Instructions:" . $_POST["txtMaintenance"];
$mail .="\n\nArt Works:";
if (isset($_POST["chBoxMurals"]))
$mail .="\n" . $_POST["chBoxMurals"];
if (isset($_POST["chBoxFrescoes"]))
$mail .="\n" . $_POST["chBoxFrescoes"];
if (isset($_POST["chBoxOurArtist"]))
$mail .="\n" . $_POST["chBoxOurArtist"];
if (isset($_POST["chBoxOurSculptor"]))
$mail .="\n" . $_POST["chBoxOurSculptor"];
$mail .="\nSpecial Instructions:" . $_POST["txtArtWorks"];
echo "<tr><td class=TextContact align=center><b>Thank You for your interest!</b></td></tr>";
mail("ralev07@gmail.com", "contact from hgxperts.com", $mail);
$emladr = "ralev07@gmail.com";
$emladr = "bariczbalazs@yahoo.com";
$emladr = "vjnvjn2000@yahoo.com";
}
?>