-1

I want to perform same as bellow in my android project how can i do it?

Html:

<html>
<body>
        <form action="npost" method="post">
        <input type="checkbox" name="n1[]" value="1">
        <input type="checkbox" name="n1[]" value="2">
        <input type="checkbox" name="n1[]" value="3">
        </form>
</body>
</html>

Php:

$s1 = $_POST["n1"]; 

1 Answers1

0

My personal approach to this problem: First, convert the array to a json ( Follow This )

After that, send the json as a normal string to your php, then use json_decode($yourstring) to convert the string to a json file.

Read the json file out and loop through it to store as an Array.

Emanuel Graf
  • 756
  • 17
  • 37