need a lil help.
Taking this example ( http://www.w3schools.com/php/php_ajax_database.asp ), I want to make the same but if you see this part of the code:
form
select name="users" onchange="showUser(this.value)/select
option value=""> Select a person: /option
option value="1"> Peter Griffin /option
option value="2"> Lois Griffin /option
option value="3"> Glenn Quagmire /option
option value="4"> Joseph Swanson /option
/select
/form
Is a static list with values given already.
I want to take out the name values from my DB and create a dropdown list with the array.
My problem is that I already make it in php but android app can't read php, so what can I do?
you can do one thing:
Suppose $data is an array contains the values for drop down.
now,you can do this:
$row=mysql_fetch_assoc();
$data=$row//array containing the values for drop down.
return json_encode($data);