danz67
asked on
JQuery Mobile - Select Menu From MySql Table
Hi,
I take the data from a table and display it in a select menu component, I tried the code below but I get only blank lines worthless.
Is there any example or you can fix my code?
Thank you all,
Regard
I take the data from a table and display it in a select menu component, I tried the code below but I get only blank lines worthless.
Is there any example or you can fix my code?
Thank you all,
Regard
<select name="cliente" id="cliente" class="select" data-inline="false" data-native-menu="false">
<option>Seleziona Cliente</option>
<?php
$query = mysql_query("SELECT * FROM clienti ORDER BY RagioneSociale desc");
while($data = mysql_fetch_assoc($query)) {
?>
<option value="<?php echo $data["RagioneSociale"]; ?>><?php echo $data["RagioneSociale"]; ?>"</option>
<?php } ?>
</select>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Best Solution for me
try replacing:
echo $data["RagioneSociale"]
with
echo gettype($data["RagioneSoci
also are you sure there is data in the array?