-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectronicsadddb.php
More file actions
27 lines (24 loc) · 821 Bytes
/
electronicsadddb.php
File metadata and controls
27 lines (24 loc) · 821 Bytes
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
<?php
$con=mysqli_connect("localhost","root","","inventory_control_system");
$db=mysqli_select_db($con,"inventory_control_system");
$id = $_POST['id'];
$name = $_POST['name'];
$brand = $_POST['brand'];
$type = $_POST['type'];
$price = $_POST['price'];
$color = $_POST['color'];
$material = $_POST['material'];
$stock_quantity = $_POST['stock_quantity'];
$warranty = $_POST['warranty'];
$query="insert into electronics(id,name,brand,type,price,color,material,stock_quantity,warranty)values('$id','$name','$brand','$type','$price','$color','$material','$stock_quantity','$warranty')";
$result = mysqli_query($con,$query);
if ($result)
{
/*echo ("<script LANGUAGE='JavaScript'>window.alert('added succefully');</script>"); */
header("location:admin.html");
}
else
{
echo "not";
}
?>