Advertisement
Guest User

Untitled

a guest
Mar 1st, 2012
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. <?php
  2.  
  3. #require_once "DB.php";
  4.  
  5.     $host       =   'localhost';
  6.     $user       =   'root';
  7.     $pass       =   '';
  8.     $database   =   'demo';
  9.  
  10. $dbc = mysqli_connect($host,$user,$pass,$database);
  11. $sql = "select * from pokemon where National_Pokedex=".$_GET['id'];
  12. #print $sql;
  13. $result = mysqli_query($dbc,$sql);
  14. $row = mysqli_fetch_array($result);
  15. print "<h1>Details of $row[1] <i>($row[0])</i> </h1>";
  16.  
  17. #print "<img src='http://upload.wikimedia.org/wikipedia/en/2/21/001Bulbasaur.png' /><p>";
  18. print "<img src='http://img.pokemondb.net/artwork/".strtolower($row[1]).".jpg' /><p>";
  19.  
  20. print "Japenese Name = ".$row[2]."<br>";
  21.  
  22. $sql2 = "select * from pokemon where National_Pokedex=".$row[3];
  23.  
  24. #print $sql2;
  25. $result2 = mysqli_query($dbc,$sql2);
  26. $row2 = mysqli_fetch_array($result2);
  27. print "Evolution = ".$row[3]."<br>";
  28. print "Evolution (name) = ".$row2[1]."<br>";
  29.  
  30. print "<a href='index.php'>Go Back</a>";
  31.  
  32. #while ($row = mysqli_fetch_array($result)){
  33. #echo "<a href='details.php?id=".$row['National_Pokedex']."'>".$row['English_name']."</a><br>";
  34. #}
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement