Форма:
<form action="includes/hed_contact.php" method="post" name="form1">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="198" align="right" valign="top" class="p_menu" scope="col">Тема сообщения:<span class="style2">*</span></th>
<th width="202" align="left" valign="top" scope="col" style="padding-left:5px; padding-bottom:5px;">
<input name="title" type="text" id="title"> </th>
</tr>
<tr>
<th align="right" valign="top" class="p_menu" scope="row">Автор сообщения:<span class="style2">*</span> </th>
<td align="left" valign="top" style="padding-left:5px; padding-bottom:5px;"><input name="author" type="text" id="author"></td>
</tr>
<tr>
<th align="right" valign="top" class="p_menu" scope="row">Текст сообщения:<span class="style2">*</span> </th>
<td align="left" valign="top" style="padding-left:5px; padding-bottom:5px;"><textarea name="text" cols="30" rows="7" id="text"></textarea></td>
</tr>
<tr>
<th align="right" valign="top" class="p_menu" scope="row">E-mail автора:<span class="style2">*</span> </th>
<td align="left" valign="top" style="padding-left:5px; padding-bottom:5px;"><input name="mail" type="text" id="mail"></td>
</tr>
<tr>
<th align="right" valign="top" class="p_menu" scope="row">Город автора:<span class="style2">*</span> </th>
<td align="left" valign="top" style="padding-left:5px; padding-bottom:5px;"><input name="city" type="text" id="city"></td>
</tr>
<tr>
<th align="right" valign="top" class="p_menu" scope="row"> </th>
<td align="left" valign="top" style="padding-left:5px; padding-bottom:5px;"><label> <br>
<input name="but" id="but" type="image" src="img/but.gif" align="bottom">
</label></td>
</tr>
</table>
<p align="right"> </p>
</form>
Обработчик (includes/hed_contact.php):
<?php include('config.php');
if (isset($_POST['title'])) {$title = $_POST['tilte']; if($title == ''){unset($title); } }
if (isset($_POST['author'])) {$author = $_POST['author']; if($author == '') {unset($author);}}
if (isset($_POST['text'])) {$text = $_POST['text']; if($text == '') {unset($text);}}
if (isset($_POST['mail'])) {$mail = $_POST['mail']; if($mail == '') {unset($mail);}}
if (isset($_POST['city'])) {$city = $_POST['city']; if($city == '') {unset($city);}}
if (isset($title) && isset($author) && isset($text) && isset($mail) && isset($city))
{
$result = mysql_query("INSERT INTO contact (title,author,text,mail,city) VALUES ('$title','$author','$text','$mail','$city')");
if ($result == 'true') {echo "Ваше сообщение успешно отправлено. Администрация свяжется с вами в ближайшее время.";}
else {echo "Что-то с базой. Сообщение не занесено в базу";}
}
else {echo "Вы заполнили не все поля. Сообщение не отправлено!";}
?>
Не добавляет данные в базу: таблица contact: с полями id,title,author,text,mail,city
Что не так? я уже код на раз 15 просмотрел и не пашет…. http://money.buxonly.com/contacts.php