Hi. Having a problem and was wondering if anyone could help me out on trying to figure out what i need to do. I've created a mysql database with fields in it and have created a php page that will list all the different things i want it to do. all works so far. one problem i'm having tho, is that the database has a column called $id where that is the first letter of an artist's name. For instance, Ozzy would be $id=O. What I had, was on the wap, click one of the 24 letters on the screen, hit ok, and go to that page where php would only show you artists that belong to that id...
example: click O -> artists_o.php -> only shows artists begining w/ "O"
that's a lot of stuff so i decided to work on a script that would allow me to query the database and create a dropdown menu so that it would connect to the db, and build a menu according to what id's are in the table. i can get it to do that, and when i select a letter on my PC it works, but on my phone, it doesn't. I cant figure out why. can anyone offer any suggestions as to why this might be happening?
[code:1:08fdbd395b]
<?php
// Connecting, selecting database
(removed connection info)
$query = "SELECT *
FROM MUSIC
ORDER BY id";
$result = @mysql_query($query);
print "
<center><b>Kitsune.us<br>
<i>Browse Artists</i></b></center><br>
<hr>
Below are 5 menus. Choose the menu you want, then select the artist section.<p>
Artists are listed by first name (Gwen Stefani is listed as G).<br>
<hr>
<form><p><select name=\'menu\"></p>";
if (mysql_num_rows($result) > 0) :
while ($row = mysql_fetch_array($result)) :
$id = $row[id];
print "<p><option value=\"artist_$id.php\">$id</option></p>";
endwhile;
print "<p></select><input type=\"button\" value=\"go\" onclick=\"document.location=options[SelectedIndex].value\"></p></form>";
endif;
?>
[/code:1:08fdbd395b]
Ultimately, what I would like eventually figure out how to do, is rather than having one page to select the artist (the drop down menu page) and 24 other separate pages (one each for $id) is to move to one page that would build a menu off database, select the $id, then build a page again based off of that menu...essentially it would be combining the menu and results into one or two pages rather than 1 and 24 pages.
The page is here: http://www.kitsune.us/wap
If you notice, after you select the first link, it goes to artist.php where it builds the menu and you select it and it goes to that artist's page (artist_$id.php). It works on a PC but not on a phone. can' figure out why. on the phone (SANYO 5300) i see the menu, but when i select the letter, nothing happens.
Thanx for any info.
Chris