At present I can insert string values individually into my Mysql db using Volley, like this :
I create two strings :
public static final String KEY_PHONENUMBER = "phonenumber"; String phoneNo; And then further on in my Volley class :
@Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> map = new HashMap<String, String>(); map.put(KEY_PHONENUMBER, phoneNo); return map; And then on my PHP side something like :
$CheckContact = $_POST['phonenumber']; etc.... So if I specify phonenumber as for example 1234567890 this will be inserted into my db.
How should the Volley code above look like if I want to post a whole arraylist of phone numbers into my db in one go ?
I have an arraylist, alContacts, which looks something like this :
[+12345, +34567, +65221, etc....] I want to insert all the numbers in my db. How would the Volley code go for this ?
I think my PHP code will be something along the lines of :
foreach($_POST['phonenumber' as $CheckContact] But I'll worry about that after the Volley code.