-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert.php
More file actions
34 lines (26 loc) · 1.03 KB
/
insert.php
File metadata and controls
34 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
include('db.php');
$data = $_POST['data'];
$marka = $_POST['marka'];
$bodywork = $_POST['bodywork'];
$length = $_POST['length'];
$width = $_POST['width'];
$height = $_POST['height'];
$engine = $_POST['engine'];
$power = $_POST['power'];
$Pcylinders = $_POST['Pcylinders'];
$Ncylinders = $_POST['Ncylinders'];
$fuel = $_POST['fuel'];
$speed = $_POST['speed'];
$acceleration = $_POST['acceleration'];
$highway = $_POST['highway'];
$city = $_POST['city'];
$year = $_POST['year'];
$model = $_POST['model'];
$query = mysql_query("INSERT INTO auto(data, marka, bodywork, length, width, height, engine, power, Pcylinders, Ncylinders, fuel, speed, acceleration, highway, city, year, model)
VALUES('$data','$marka','$bodywork', '$length', '$width', '$height', '$engine', '$power', '$Pcylinders', '$Ncylinders', '$fuel', '$speed', '$acceleration', '$highway', '$city', '$year','$model')");
if ($query=='true')
{echo "Ваши данные успешно добавлены";}
else
{echo "Ваши данные не добавлены";}
?>