<div class="row">
<form method="POST" action="add_orders.php">
<div class="col-md-4">
<div class="container-form">
<div class="input_class">
<input type="title" name ="title" class="input_text input_form" placeholder="Заголовок">
<input type="name" name ="name" class="input_text input_form" placeholder="Заказчик">
</div>
</div>
</div>
<div class="col-md-4">
<div class="container-form">
<div class="input_class">
<input type="hidden" name="date" class="input_text input_form" value="<?php echo date('Y-m-d') ?>">
</div>
</div>
</div>
<div class="col-md-4">
<div class="container-form">
<div class="input_class">
<input type="text" name="summ" class="input_text input_form" placeholder="Сумма">
<select name="status" class="select_option input_form">
<option value="0">Статус</option>
<option value="1">Завершен</option>
<option value="2">Идут работы</option>
</select>
</div>
</div>
</div>
<input type="submit" name="add" value="Добавить">
</form>
<?php
include("config/config_database.php");
if(isset($_POST['add'])){
$title = strip_tags(trim($_POST['title']));
$name = strip_tags(trim($_POST['name']));
$summ = strip_tags(trim($_POST['summ']));
$status = $_POST['status'];
$date = $_POST['date'];
mysql_query(" INSERT INTO eb_orders(title, name, summ, status, date)
VALUES ('$title', '$name', '$summ', '$status' $date') ");
mysql_close();
echo "News added";
}
?>
</div>