Hello; I am the editor of a small businessman society website. At the top of the page I want to display the member logos. I have assigned logos for each member and these logos appear in marquee order from left to right. When clicked, a new page informing of the related member will be shown. There are about 60 members and I want 16 logos randomly selected to be displayed each time the page is refreshed. The path to the logos and other information is stored in database. I managed to make it work. However, it often doesn't work and the logos won't be seen. What is the problem, do you think? Here is the code: $result = mysql_query("SELECT * FROM asil_members ORDER BY RAND() LIMIT 16"); while($row = mysql_fetch_array( $result )) { $id = $row['id']; $word = $row['word']; $logo = $row['logo']; $firma_adi = $row['firma_adi'] echo "<a href=\"javascript:poptastic('/_includes/_uye-tekil.php?id=", $id, "');\"><img border='0' alt='", $firma_adi, "' title='", $firma_adi, "' width='100' height='100' src='", $logo, "' /> </a>"; } PHP: And below this code is the js for the marquee. Please help.
Try this: $result = mysql_query("SELECT * FROM asil_members ORDER BY RAND() LIMIT 16"); while($row = mysql_fetch_array( $result )) { $id = $row['id']; $word = $row['word']; $logo = $row['logo']; $firma_adi = $row['firma_adi']; echo "<a href=\"javascript:poptastic('/_includes/_uye-tekil.php?id=".$id."');\"><img border='0' alt='".$firma_adi."' title='".$firma_adi."' width='100' height='100' src='".$logo."' /> </a>"; } Code (markup):
Thanks a lot. It seems to work now. But the real problem was, as far as I can see, the fact that some logos were missing as I hadn't had time to design new logos for some of the recent members. Now I have done it and it works, for the moment at least.