Guest User

Untitled

a guest
Jun 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <?php include("game.php");
  2.  
  3. $enemy=$_GET["enemy"];
  4.  
  5. $url=$_SERVER["GET_URI"];
  6.  
  7. $sql="UPDATE users SET action='$url' WHERE user='$user'";
  8.  
  9. $result=mysql_query($sql);
  10.  
  11. ?>
  12.  
  13. Battle!
  14.  
  15. <br>
  16.  
  17. <?php
  18.  
  19. if (enemy($enemy)==0)
  20.  
  21. {
  22.  
  23. $desc=get_stat("description");
  24.  
  25. $desc="<a href=win.php?enemy=".$enemy."&url=Dino.php>Continue</a><br>".$desc;
  26.  
  27. set_stat("description",$desc);
  28.  
  29. //header("location:"."win.php?enemy=".$enemy."&url=Dino.php");
  30.  
  31. }
  32.  
  33. else
  34.  
  35. {
  36.  
  37. echo '
  38.  
  39. <br>
  40.  
  41. <a href="attack.php?url=Dino_battle.php&enemy='.$enemy.'">Attack</a>
  42.  
  43. <br>
  44.  
  45. <a href="end_action.php?url=Dino.php">Run Away</a>';
  46.  
  47. $user_id=get_user_id($_SESSION['user']);
  48.  
  49. $sql="SELECT * FROM skills WHERE id=$user_id";
  50.  
  51. $result=mysql_query($sql);
  52.  
  53. echo "<table border=1>";
  54.  
  55. while($row=mysql_fetch_array($result))
  56.  
  57. {
  58.  
  59. $k=$row['skill'];
  60.  
  61. $s="SELECT * FROM abilities WHERE id=$k";
  62.  
  63. $r=mysql_query($s);
  64.  
  65. while($row=mysql_fetch_array($r))
  66.  
  67. {
  68.  
  69. $str="<a href='attack.php?url=Dino_battle.php&enemy=".$enemy."&skill=".$k."'>".$row['name']."</a>";
  70.  
  71. if (get_stat("mana")<$row['mana'])
  72.  
  73. {
  74.  
  75. $str=$row['name'];
  76.  
  77. }
  78.  
  79. echo "<tr><td>".$str."</td><td><img src='".$row['sprite']."'/></td></tr>";
  80.  
  81. }
  82.  
  83. }
  84.  
  85. echo "</table>";
  86.  
  87. }
  88.  
  89. echo "
  90.  
  91. <table border=1><tr><td>"
  92.  
  93. .get_stat("description").
  94.  
  95. "</td></tr></table>";
  96.  
  97. ?>
  98.  
  99.  
  100. ---------------------------------------------------------
  101.  
  102. Gives this error,
  103.  
  104. Notice: Undefined index: GET_URI in C:\HostingSpaces\arcorian\arcoria.net\wwwroot\Dino_battle.php on line 5
  105. Battle!
Add Comment
Please, Sign In to add comment