PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 2nd, 2011, 07:47 AM
ArnMan ArnMan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 4 ArnMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 10 sec
Reputation Power: 0
Href stops including the img and text

Hello,
i have run into a problem, I am not sure if it is a firefox problem or what.
I am working on a script the queryies the mysql, and then instead of listing all the items one after another down the page, I have it set up to do 5 across and add another row if there are more items to be shown. And they are seperated into groups.
What is happeneing. I use firefox, the latest version whatever it is right now.
It lists all the items, but when it gets to the endof items, (which include a small image of the item and the name of it) Href doesnt seem to make my image and text a link anymore. but if I move my cursor to the very top of the image, which is only 50x50 into the first few rows of pixels, then I get my link.
I opened up internet explorer, and loaded my page and everything is linked. So i dont know it is just firefox bug or I need to code something for both.

The last part of the code checks to see if there is a quantity > 1 and if there is it puts thepic and quantity next to the name of them item, if not it just puts the pic and name. and That is the one that is not working correctly.
Here is what I am working with.


PHP Code:
<div class ='inventorystuff'>  ";  
 
$inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$useridORDER BY i.itmtype ASCi.itmname ASC"); 
 if (
$db->num_rows($inv) == 0)  

 print "
<b>You have no items!</b>"; 
 } 
  else
  {  
     print "
<table width='650px' border='1' cellspacing='5' align='center'"; 
 
$lt="";  
 
$numrows = (mysql_num_rows ($inv)); 
 if(
$numrows >0)
 {  
    
$position = 1;   
while(
$i=$db->fetch_row($inv)) 
 {     
 
$rows = mysql_num_rows($inv); 
 
$counter = 1;
 
$cols = 5; 
 if(
$lt!=$i['itmtypename'])   
 {  
$lt=$i['itmtypename']; 
 
$ltp = $i['itempic']; 
 print "
<tr><td colspan=10><b>{$lt}</b></td></tr>";  
    } 
     if(
$position == 1) 
{
 echo "
<tr>";
 } 
  if (
$i['inv_qty'] > 1) 
 {
  print <<<OUT
 <td border=0><center><a href="
itemlookup.php?ID={$i['itmid']}" rel="itemlookup.php?ID={$i['itmid']}"><font color="#FFFFFF"><img src="images/{$i['itempic']}"><br>{$i['itmname']}&nbsp;x{$i['inv_qty']}</a></center></font></td>
  
OUT;
  } 
 else
 {

 
//--------->>>>This is the line that gives me trouble<<<--- 

 
print <<<OUT 
<td border=0><center><a href="itemlookup.php?ID={$i['itmid']}rel="itemlookup.php?ID={$i['itmid']}"><font color="#FFFFFF"><img src="images/{$i['itempic']}"><br>{$i['itmname']}</center></font></td></a>
  
OUT;  

 echo
"";
  
//----------------------------------------- 
 
if($position == 5
{
 echo 
"</tr> "
 
$position 1;
 } 
else
 { 
 
$position++; 

 } 
 
$end ""
 if(
$position != 1)
 { 
 for(
$z=(5-$position); $z>$z--)
 { 
 
/*$end .= "<td></td>";*/ 
 
}
  
$end .= "</tr>";  
}
/*echo "</tr>";*/ # /*}*/ 
//----------------------------------------  
 /*print "</td> ";*/ 
 
}
  print 
"</tr>"
 print 
"<tr><td colspan=10></td></tr></table>"



Thank you in advance for any help

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Href stops including the img and text


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap