I am trying to send following data to my php but program crashes if I put more than one s1 variable.
Java code:
//my java code goes here
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<>();
params.put("s1",max[0]);
params.put("s1",max[1]);
params.put("s1",max[3]);
return params;
}
PHP code:
//my php code goes here
<?php
$con = mysqli_connect('localhost','myuser','mypass');
mysqli_select_db($con,'mydb');
$checked = $_POST["s1"];
$SQL = "INSERT INTO TABLE VALUES ('$checked[0]','$checked[1]','$checked[2]')";
mysqli_query($con,$SQL);
?>