Проблем с изпращането на форма!

mar4eto88

Registered
Здравейте!
Някой може ли да ми помогне. Информацията от формата не се изпраща на имейла. Когато махна <div> работи. Какво трябва да добавя за да работи с <div>.
<html>
<head>
<title>Sample Email Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

<script type="text/javascript">
var counter = 0;
var limit = 5;
function add_user(FieldName) {
if (counter == limit) {
alert("Съжалявам, не можете да добавите повече полета! " + counter + " inputs");
}
else {
var newFields = document.getElementById(FieldName).cloneNode(true);
newFields.id = '';
newFields.style.display = 'block';
var newField = newFields.childNodes;
for (var i=0;i<newField.length;i++) {
var theName = newField.name
if (theName)
newField.name = theName + counter;
}
var insertHere = document.getElementById(FieldName);
insertHere.parentNode.insertBefore(newFields,insertHere);
counter++;
}
}
</script>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="myphpform" onsubmit="this.divcontent.value = document.getElementById('user').innerHTML;" enctype="multipart/form-data">
<table>

<div>
<tr id="user">
<td class="bodytext" align="left">Линк:
<textarea name="link9[]" cols="30" rows="4" value=""""></textarea></td>
<td class="bodytext" align="right">Размер:<input name="size9[]" type="text" size="5"></td>
<td class="bodytext" align="right">Цвят:<input name="color9[]" type="text" size="8"></td>
<td class="bodytext" align="right">Цена:<input name="price17[]" type="text" size="5" maxlength="3">.<input name="price18[]" type="text" id="price18" size="5" maxlength="2"></td></tr></div>
<tr>
<td> </td></tr>
<tr>
<td> </td></tr>
</table>
<table>
<div>
<tr id="add_user" style="display: none;">

<td class="bodytext" align="left">Линк:<textarea name="link9" cols="30" rows="4" id="link10" class="bodytext"></textarea></td>
<td class="bodytext" align="right">Размер:<input name="size9" type="text" id="size10" size="5"></td>
<td class="bodytext" align="right">Цвят:<input name="color9" type="text" id="color10" size="8"></td>
<td class="bodytext" align="right">Цена:<input name="price10" type="text" id="price1" size="5" maxlength="3">.<input name="price10" type="text" id="price2" size="5" maxlength="2"></td></tr></div>

<tr>
<td> </td></tr>
<td>
<?
if ($_POST["submit"]) {
$to="mar4eto_15@abv.bg";
$subject="заявка";






$body=" Заявка:

От: ".$_POST["email"]."\n
Линк9: ".$_POST["link9[]"] . "\n
Размер: ".$_POST["size9[]"] . "\n
Цвят: ".$_POST["color9"] . "\n
Цена: ".$_POST["price[17]"] . " . ".$_POST["price[18]"] . "\n
Линк10: ".$_POST["link[10]"] . "\n
Размер: ".$_POST["size[10]"] . "\n
Цвят: ".$_POST["color[10]"] . "\n
Цена: ".$_POST["price19"] . " . ".$_POST["price20"] . "\n";
$message=???div user???;
/* send email */
$headers = "MIME-Version: 1.0\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: \n";
$headers .= "X-Mailer: PHP-mailer\n";
$headers .= "Content-type: text/plain; charset=utf-8\n";
$headers .= "From: $emai \n";

mail($to,$subject,$message,$body,$headers);

echo "<p> Вашата заявка е изпратена успешно!</p>";

}
?>
<td/>
</tr>
<tr>
<td> </td></tr>
<tr>
<td><input type="hidden" name="divcontent" id="divcontent" value="" /></td></tr>
<tr>
<td>
<input type="button" id="add_user()" onclick="add_user('add_user')" value="Добавете още полета за порачка!" /></td></tr>
<tr>
<td> </td></tr>
<tr>

<td><input type="submit" name="submit" value="Изпрати" />
</tr>

</table>

</form>
</body>
</html>
 

Горе