logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Dropdown List with links ?
Author
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Mon 18 Apr '11 12:03    Post subject: Dropdown List with links ? Reply with quote

Hey All

Really need help with the above mentioned topic. I've been able to get the links to work fine, but cant get them to show in a dropdown list. Hve tried so many solutions but none of them is working.. Here is the code that I uses to get the links to work.
Code:
$mysqluser = 'root';
$mysqlpasswd = '';
$mysqlhost = 'localhost';
$mysqlDB = '';
mysql_connect($mysqlhost,$mysqluser,$mysqlpasswd);
mysql_select_db($mysqlDB) or die( "Unable to select database");

$LSHIP = $_GET['LSHIP'];
$LVL = $_GET['LVL'];
$GRP = $_GET['GRP'];

$query01 = "select distinct Learnership , Level, YGroup from training_event";
$result01=mysql_query($query01);

while($nt=mysql_fetch_array($result01))
    {
    ?>
    <table border=0 width="100%" bgcolor="#99bbcc">
        <tr>
           <td>
            <a href="indexp10_manage_reports_7001.php?LSHIP=<?PHP echo $nt[Learnership].'&LVL='.$nt[Level].'&GRP='.$nt[YGroup]; ?>">
           <font size="1" face="bmwtyperegular" color="#eeeeee">
              <?PHP echo $nt[Learnership].' '.$nt[Level].' GROUP '.$nt[YGroup]; ?>
              </a>
           </td>

        </tr>
    </table>



Help would really be apprecited... I've run out of options and dont know where else to look.. Hope and pray that I would get my answer here..
Thanx in advance
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 18 Apr '11 15:01    Post subject: Reply with quote

Ok this is more a html issue than a PHP issue. However. What you searh can be found in http://www.mcfedries.com/javascript/linklist.asp

or isn't that what you want?

My google search was: http://lmgtfy.com/?q=links+in+a+dropdownlist

if you still have a question please ask again Smile
Back to top
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Wed 20 Apr '11 11:10    Post subject: Reply with quote

Thank you James blond for your response and the links.


Well I have tried so many solutions now and also looked at the links you provided me with but its not helping at all...

Its either an empty dropdownlist appears next to each result or
each result is displayed in its own dropdown list and doesnt act as a link anymore.

All I would like is for all the links to be displayed in one dropdown list.

This is all so stressful *aahhhhhhhhhhhhh* , please if you cn offer more help please do it would be highly appreciated.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 20 Apr '11 14:50    Post subject: Reply with quote

it would help if you paste what you tried so far. (just post the while part from your script and maybe also the generated HTML code.
Back to top
fifimtwana



Joined: 24 Feb 2011
Posts: 22

PostPosted: Tue 03 May '11 15:07    Post subject: Reply with quote

modnote: reformated code outsourced to http://pastebin.com/ZRNZSu1z
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 03 May '11 16:06    Post subject: Reply with quote

bad html code Wink I had to reformat it so I can read it... result http://pastebin.com/ZRNZSu1z

I guess the relevant part is onlythis, isn't it?

Code:

<select name="AID">
   <?php
   while($nt=mysql_fetch_array($result3)){
      echo '<option value='. $nt['ID'].'">'. $nt['Name'].' '.$nt['Surname'] .'</option>';
   }
   ?>
</select>


so where shall be the link in this wired construct?
Back to top


Reply to topic   Topic: Dropdown List with links ? View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner