Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: scroll box and URI
01-24-2004, 01:56 PM #1
- Join Date
- Jan 2004
- Thanked 0 Times in 0 Posts
scroll box and URI
im having probs
im using dreamweaver4,php4 and mysql.
what i want is to show the url's in the listbox this is what i have show far
<select name="track2edit"size="1"> **********
(4) $artist= $c_array['totart_names'];
(5) $user= $c_array['spare3'];
(6) $artistlink="<a href=audmp3.php?cart=$artist
(7) print '<option value="'.$user.'">'.$thelink.'</option>';
what happens here is
it looks for the artist and user name in the mysql DB
then store them as URI (url) in the $artistlink varible
then show them as a link in the listbox or menubox (scrollable)
then keep doing the whole block again till $c_array is negative
what happens in reality is
it does find all the data and place them in the box
BUT the data appears as normal text instead of a clickable link
so i think in line 6 in the above code is at fault BUT
here comes the big catch
if you remove the lines with the stars (remove the list box) and re-run the code
you will see the the names from the database, once echoed to the screen is now clickable urls.
but i really need in list the box as i want the results of hundreds of artist names in a maintainable scrollable area
i hope you understood my theory
PhpFingersbit rate on then off, whats the speed?
01-24-2004, 03:47 PM #2
- Join Date
- May 2002
- Perth Australia
- Thanked 92 Times in 90 Posts
this is a html/forms issue not PHP , you can't stick links like that in a select element, you can put the select box in a <form> and detect onSubmit the selected form item (or add some onclick event to the individual options ?) but again thats not PHP related ... moving to general forumresistance is...
MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)