I am sending data from my android app form to php mysql server and from server i am getting response code 200 but failed to make any entries into database.

**Here is my php file where i am sending POST variables**

```
    <?php

$host='localhost';
$uname='root';
$pass='pass';
$db='App';

$con=mysqli_connect($host,$uname,$pass,$db);

$First_Name=$_POST['First_Name'];
$Last_Name=$_POST['Last_Name'];
$Phone=$_POST['Phone'];
$Mail_ID=$_POST['Mail_ID'];
$Password =$_POST['Password'];
$La=$_POST['La'];
$Lo=$_POST['Lo'];
$Ac=$_POST['Ac'];
$Pro=$_POST['Pro'];

if($con){
 echo "Connected Successfully to database $First_Name "; //Print Variable to Check that file is getting inputs.Its Working.
}
else{
echo 'Failed To Connect to database ';
}

$sql="INSERT INTO `mobile_App`(`First_Name`, `Last_Name`, `Phone`, `Mail_ID`, `Password`, `La`, `Lo`, `Ac`, `Pro`)
VALUES ($First_Name,$Last_Name,$Phone,$Mail_ID,$Password,$La,$Lo,$Ac,$Pro)";

if(mysqli_query($con,$sql)){
echo 'Data Inserted Successfully';
}
else{
echo "ERROR: could not able to execute $sql.".
mysqli_error($con) ;
}

mysqli_close($con);
?>

```

**This is my Java File** 

```
    public class Sending_Data_To_Server extends AsyncTask{
String Lo,La,Ac,Pro,First_Name,Last_Name,Phone,Mail_ID,Password;
BufferedReader reader;

@Override
protected String doInBackground(String... params) {
    //Variables
    First_Name=params[0];
    Last_Name=params[1];
    Phone=params[2];
    Mail_ID=params[3];
    Password=params[4];
    Lo=params[5];
    La=params[6];
    Ac=params[7];
    Pro=params[8];
    Log.d("SEND DATA VALUES",First_Name+Last_Name+Lo+La+Phone);

    try {
        String data= URLEncoder.encode("First_Name","UTF-8")+ "=" +URLEncoder.encode(First_Name,"UTF-8");
        data+= "&" +URLEncoder.encode("Last_Name","UTF-8")+ "=" +URLEncoder.encode(Last_Name,"UTF-8");
        data+= "&" + URLEncoder.encode("Phone","UTF-8")+ "=" +URLEncoder.encode(Phone,"UTF-8");
        data+= "&" + URLEncoder.encode("Mail_ID","UTF-8")+ "=" +URLEncoder.encode(Mail_ID,"UTF-8");
        data+= "&" + URLEncoder.encode("Password","UTF-8")+ "=" +URLEncoder.encode(Password,"UTF-8");
        data+= "&" + URLEncoder.encode("La","UTF-8")+ "=" +URLEncoder.encode(La,"UTF-8");
        data+= "&" + URLEncoder.encode("Lo","UTF-8")+ "=" +URLEncoder.encode(Lo,"UTF-8");
        data+= "&" + URLEncoder.encode("Ac","UTF-8")+ "=" +URLEncoder.encode(Ac,"UTF-8");
        data+= "&" + URLEncoder.encode("Pro","UTF-8")+ "=" +URLEncoder.encode(Pro,"UTF-8");

        URL url=new URL("test/Android/Data/data.php");   // can't post complete url due to restriction to new users 
        HttpURLConnection connection= (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("POST");
        connection.setDoInput(true);
        connection.setDoOutput(true);

        //For POST Only - Begin
        connection.setDoOutput(true);
        OutputStream os=connection.getOutputStream();
        BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(os,"UTF-8"));
        writer.write(data);
        writer.flush();
        writer.close();
        os.close();
        connection.connect();
        //For POST Only End
        int responseCode=connection.getResponseCode();
        Log.d("Sending Class----","POST RESPONSE CODE "+responseCode);

        if (responseCode==HttpURLConnection.HTTP_OK){
            //Success
            reader=new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String inputLine;
            StringBuffer response=new StringBuffer();

            while((inputLine=reader.readLine())!=null){
                response.append(inputLine);
            }
            reader.close();

            //Print Result
            Log.d("SENDING CLASS----",response.toString());

        }
        else{
            Log.d("SENDING CLASS---","POST did not work");

        }

    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

    return "DATA SUBMITTED";
}

}

```

**Here is Logcat**

```
    06-29 20:48:52.703 7211-7211/com.boysjoys.com.pro_working1 D/REGISTRATION CLASS: ----ALL DATA READY AND CAPTURED
06-29 20:48:52.723 7211-29559/com.boysjoys.com.pro_working1 D/SEND DATA VALUES: helloworld28.531212977.25688999865321472
06-29 20:48:52.893 7211-7211/com.boysjoys.com.pro_working1 W/FragmentManager: moveToState: Fragment state for AppIntroFragment{423d9470 #1 id=0x7f0e009f android:switcher:2131624095:1} not updated inline; expected state 3 found 2
06-29 20:48:52.933 7211-7211/com.boysjoys.com.pro_working1 D/AppIntroBaseFragment: Slide Hello World has been selected.
06-29 20:48:53.423 7211-29559/com.boysjoys.com.pro_working1 D/Sending Class----: POST RESPONSE CODE 200
06-29 20:48:53.423 7211-29559/com.boysjoys.com.pro_working1 D/SENDING CLASS----: Connected Successfully to database hello ERROR: could not able to execute INSERT INTO `mobile_App`(`First_Name`, `Last_Name`, `Phone`, `Mail_ID`, `Password`, `La`, `Lo`, `Ac`, `Pro`)VALUES (hello,world,9810012345,Google@gmail.com,adffgghhjjk,77.2568899,28.5312129,37.5,Fixed).You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@gmail.com,adffgghhjjk,77.2568899,28.5312129,37.5,fused)' at line 2

```

And my Database structure 
[Rows Where I want to insert app data](http://i.stack.imgur.com/AQTvy.png)

Till now i have tried so many tutorials and guide and most of the places i have seen HttpClient which is depreciated so i am working with only HttpUrlConnection and as server returned status code 200 i think its some fault in php mysql file but not sure.

As @Adam Forbis suggest to print mysql error and check that value is getting by php file.So i did and i edit my PHP file to get those details and now i m updating logcat with mysql error