i want to insert some form data into database. I am using php/bootstrap/mysqli. i am not good at bootstrap.i have tried several method but its not working. there is no error also , hence i don’t understand what am i doing wrong.it would be very appreciative if anyone could help me.
here is my form
Items Table
Add
×
Add Item
Item Code
Name
Unit Id
Unit Price
Category
Category 1
option 2
Close
Save
here is my connection
<?php
$con=mysqli_connect('localhost','...','...','soft');
if(isset($_POST['submit'])){
$code=$_POST['code'];
$unit=$_POST['unit'];
$name=$_POST['name'];
$price=$_POST['price'];
$cate=$_POST['cate'];
mysqli_query($con,"insert into item (code,unit,name,price,cate)
values('$code','$unit','$name','$price','$cate')");
}
?>