(!) Notice: Undefined index: location in C:\wamp\www\???????\equipped.php on line 35
Code:
Code: Select all
 <?php
include_once 'connect.php';
 session_start();
   include_once 'logo.php';
   ?>
   <html>
    <head>
     <div>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="style.css" rel="stylesheet" type="text/css" />
   </head>
     </div>
     </html>
<?php
if (isset($_SESSION['player']))
{
  $player=$_SESSION['player'];
}
else
{
  echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
  exit;
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("Could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
$id=$playerinfo3['id'];
?>
</div>
<div id="table">
 <?php
	    $type=$_GET['type'];
           $location=$_GET['location'];
	   $randid=$_GET['randid'];
	  
	   if ($type=="w")
	   {
	 $updateequip="Update playerweapons SET equip=0 WHERE pid='$id' AND equip=1";
	    mysql_query($updateequip) or die("Could not update equipment");	
		 $reequip="Update playerweapons set equip=1 where pid='$id' AND randid='$randid'";
	    mysql_query($reequip) or die("Could not update equipment2");	
		
		echo "<center><big><big>Weapon Equipped<br></big></big>";
		echo "<br><A href='index.php'>Go back</a>";
		}
		if ($type=="a")
	  {
	   $updateequip="Update playerarmor SET equip=0 WHERE pid='$id' AND equip=1 AND location='$location'";
       mysql_query($updateequip) or die("Could not update armor");   
      
      
       $reequip="Update playerarmor set equip=1 where pid='$id' AND randid='$randid' AND equip=1 AND location='$location'";
       mysql_query($reequip) or die("Could not update armor2"); 	
		
		echo "<center><big><big>Armor Equipped<br></big></big>";
		echo "<br><A href='index.php'>Go back</a>";
		}
  
  ?>
</div>Thank you

Andrew

