Legaci Posted September 28, 2013 Share Posted September 28, 2013 Notice: Undefined variable: eq in C:\Users\AJ\Downloads\USBWebserver v8.5\USBWebserver v8.5\8.5\root\index.php on line 479 $q_ry = "SELECT `item_id`,`item_picture` FROM `items` WHERE `item_id` IN ('".$do['melee']."', '".$do['secondary']."', '".$do['primary']."', '".$do['temporary']."', '".$do['armour']."')"; $eitems = mysql_query($q_ry); while($r = mysql_fetch_array($eitems)) { $eq[$r['item_id']]=$r; } echo "<table cellspacing='0' border='0' width='0px'> <tr><td align='left'>"; if($eq[$do['melee']]['item_id']) { echo "<img src='images/items/".$eq[$do['melee']]['item_picture']."'></td>"; } else { print ""; } line 479 is: if($eq[$do['melee']]['item_id']) i have tried everything possible (but nothing seems to work for me!) i know i could turn notices off but perfection is what i am after Quote Link to comment Share on other sites More sharing options...
Seker Posted September 28, 2013 Share Posted September 28, 2013 Notice: Undefined variable: eq in C:\Users\AJ\Downloads\USBWebserver v8.5\USBWebserver v8.5\8.5\root\index.php on line 479 $q_ry = "SELECT `item_id`,`item_picture` FROM `items` WHERE `item_id` IN ('".$do['melee']."', '".$do['secondary']."', '".$do['primary']."', '".$do['temporary']."', '".$do['armour']."')"; $eitems = mysql_query($q_ry); while($r = mysql_fetch_array($eitems)) { $eq[$r['item_id']]=$r; } echo "<table cellspacing='0' border='0' width='0px'> <tr><td align='left'>"; if($eq[$do['melee']]['item_id']) { echo "<img src='images/items/".$eq[$do['melee']]['item_picture']."'></td>"; } else { print ""; } line 479 is: if($eq[$do['melee']]['item_id']) i have tried everything possible (but nothing seems to work for me!) i know i could turn notices off but perfection is what i am after This one's pretty self explanatory. "$eq" id undefined. Define it. Quote Link to comment Share on other sites More sharing options...
Legaci Posted September 28, 2013 Author Share Posted September 28, 2013 i have tried defining it but it doesnt work.... Quote Link to comment Share on other sites More sharing options...
Guest Posted September 28, 2013 Share Posted September 28, 2013 Try $eq = array(); while($r = mysql_fetch_array($eitems)) { $eq[$r['item_id']]=$r; } Quote Link to comment Share on other sites More sharing options...
Legaci Posted September 28, 2013 Author Share Posted September 28, 2013 already tried that one :/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.