I am not familiar with PHP,but I need to use PHP as backend for insert data into database from my android app using xamp local host.I got a PHP code but it shows the error "undefined index in line 4 (username)".I cant find the ERROR, so please help me, thanks.
here is my code
<?php
mysql_connect("localhost","root","");
mysql_select_db("taskmanager");
$name=null;
$name=$_POST['username'];
$ins="insert into userlog (username)values('$name')";
mysql_query($ins);
mysql_close();
?>