Help with code needed

A

Anonymous

Guest
Help needed please.....
I have the code below which displays a list of names within a marquee. What i'd like to do is make each name that appears a hyperlink to a page. The hyperlink code if not used in the marquee is:
<a href=MemberInfo.php?IDNo=$IDNo></a>
but i cant work out how to make this work inside the code below.


<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=80 direction=up width=200 height=70>
<FONT face="comic sans ms" size=2><B><p align="center">SFE Members List:<BR></B>
<?php
$db = mysql_connect("*********","**********","********");
mysql_select_db("deltaforceone",$db);
$result = mysql_query("SELECT * FROM DF1 order by IDNo",$db);
while ($myrow = mysql_fetch_array($result)) {
echo $myrow ["Handle"]."<BR>
";
}
?>
</FONT></marquee>

I would be very grateful if anyone could assist me with this, thanks

Tony
 
our code
Code:
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=80 direction=up width=200 height=70> 
<FONT face="comic sans ms" size=2><B><p align="center">SFE Members List:<BR></B> 
<?php 
$db = mysql_connect("*********","**********","********"); 
mysql_select_db("deltaforceone",$db); 
$result = mysql_query("SELECT * FROM DF1 order by IDNo",$db); 
while ($myrow = mysql_fetch_array($result)) { 
echo $myrow ["Handle"]."<BR> "; 
} 
?> 
</FONT></marquee>

My code
Code:
<FONT face='comic sans ms' size=2><B><p align=center>SFE Members List:<BR></B> 
<?php 

$db = mysql_connect("*********","**********","********"); 
mysql_select_db("deltaforceone",$db); 
$result = mysql_query("SELECT * FROM DF1 order by IDNo",$db); 
while ($myrow = mysql_fetch_array($result)) { 
echo "<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=1 scrollDelay=80 direction=up width=200 height=70> ";

echo "<a href=$myrow['Url']>$myrow ['Handle']</a></marquee> <BR> "; 

} 
?> 
</FONT>
 
Ok, thanks for replying, but...

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/deltaforceone/www/ESF/SFETop.php on line 27

line 27 looks like,

echo "<a href=$myrow["MemberInfo.php?IDNo=$IDNo"]>$myrow ["Handle"]</a></marquee> <BR> ";

I dont know if its possible to do what i want, the list is displayed in a marquee, the list is taken from a db called DF1, each name has a IDNo which is in same db but seperate field. As the names scroll, the hyperlink that needs to be created is to Memberinfo.php containing the IDNo of the persons name so that memberinfo.php can display the correct information.

Does any of that make sense, lol coz i'm slowly confusing myself.

Any further help gratefully received....

Tony.
 
my mistake


$query=mysql_query("SELECT * FROM `yourtable` WHERE `IDNo` = '$IDNo'");
$myrow=mysql_fetch_array($query);


Code:
echo "<a href=MemberInfo.php?IDNo=$myrow[IDNo]>$myrow [Handle]</a></marquee> <BR> ";
 
Back
Top