Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    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"> **********
    (2)while ($c_array=mysql_fetch_array($result))
    (3) {
    (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>';
    (8) }
    </select> **********

    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

    bit rate on then off, whats the speed?

  • #2
    Super Moderator
    Join Date
    May 2002
    Perth Australia
    Thanked 101 Times in 99 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 forum
    resistance 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)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts