Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted
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.

Posted

Try

 

$eq = array();
while($r = mysql_fetch_array($eitems))
{

  $eq[$r['item_id']]=$r;


}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...