Hello sir i send the arraylist through url pass from android to php all array list is inserted to one row in single coloumn . i want inserted one column(menuname) to multiple rows
EG:
i pass array list[x,y,z.........] android to php
mysql
menuname
x
y
z(i want like this)
i try this code
<?php
$arr[]=$_POST['menuname'];
mysql_connect("localhost","root","mobixmysql");
mysql_select_db("test");
foreach($arr as $value){
$value;
mysql_query("INSERT INTO test (menuname) VALUES ('" .
mysql_real_escape_string($value) . "')")or
die('unable'.mysql_error());
echo "inserted";
}
?>
i try above code it insert the database in menuname column in one row . i want add multiple rows in one column
I assume that
$_POST['menuname']is not array;