I have
<form action="entry.php" method="post" >
<table>
<tr>
<td>
<input type="text" name="searchid[]" id="searchid" placeholder="Data 1" ><br />
<input type="text" name="searchid[]" id="searchid" placeholder="Data 2" ><br />
<input type="text" name="searchid[]" id="searchid" placeholder="Data 3" ><br />
<input type="text" name="searchid[]" id="searchid" placeholder="Data 4" ><br />
</td>
</tr>
<tr>
<td><input type="submit" name="submit" id="submit" value="submit" /></td>
</tr>
</table>
</form>
And entry.php code,
<?php
include "db.php";
if (isset($_POST["submit"]))
$data1 = mysql_real_escape_string($_POST['searchid']);
$query1 = "INSERT INTO php_test (name) VALUES ('$data1')";
$query = mysql_query($query1,$connection);
if($query){
header ("location: index.php");
}
else{
echo "Something Wrong";
}
?>
This code working with single input data but, I want to enter four data in seperate field of same column and when I submit then it insert data in seperate row, fields name are same and