This is my HTML code
<div class="control-group">
<div class="controls form-inline">
<input type="text" name="plot_id" class="form-control" disabled="true" value="<?php echo $plot_id; ?>" style="width: 50px;" />
<input type="text" name="khasra_id" class="form-control" disabled="true" value="<?php echo $khasra_id; ?>" style="width: 50px;"/>
Plot Number : <input type="text" name="plot[]" class="form-control" placeholder="Ex 113A/113B/113C"/>
Area : <input type="text" name="plot[]" class="form-control" required="required" placeholder="Ex 1000 sq ft "/>
<input type="text" name="tot" class="form-control" disabled="true" value="<?php echo $tot; ?>" style="width: 50px;"/>
Facing : <input type="text" name="plot[]" class="form-control" required="required" placeholder="Ex North/East" />
Type : <input type="text" name="plot[]" class="form-control" required="required" placeholder="Ex Ressidental/Comm" />
Status : <select class="form-control" name="plot[]">
<option value="Available">Available</option>
<option value="Book">Book</option>
</select>
</div>
</div>
<br/>
This is my php code
if(isset($_POST['final_split'])){
$con=mysqli_connect("localhost","******","******","********");
if (mysqli_connect_errno()){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
foreach ($_POST as $key => $value) {
$insert_into = mysqli_query($con,"INSERT INTO plot_deatils(plot_id,khasra_id,plot_number,area,tot,facing,typee,statuss) VALUES(
'$_POST[plot_id]','$_POST[khasra_id]','$_POST[plot][0]','$_POST[plot][0]','$_POST[tot]','$_POST[plot][0]','$_POST[plot][0]','$_POST[plot][0]',
)");
}
}
This is my code where i have wrote the db connection. please some one can help me to solve the above problem which i want to insert the above code to db through the post array data
<form>tag here, did you forget to put it here, or don't you have it in your page ? As such, it will actually never post anything... and if it does, I see no database connection neither so it wouldn't insert anything.TABLE?