Author |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Mon 18 Apr '11 12:03 Post subject: Dropdown List with links ? |
|
|
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
|
|
Back to top |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Wed 20 Apr '11 11:10 Post subject: |
|
|
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
|
Posted: Wed 20 Apr '11 14:50 Post subject: |
|
|
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
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 03 May '11 16:06 Post subject: |
|
|
bad html code 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 |
|