Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <html>
  2. <link type="text/css" rel="stylesheet" href="stylesheet_battlefront.css"/>
  3. <body>
  4. <?php
  5. $servername = "localhost";
  6. $username = "root";
  7. $password = "usbw";
  8. $dbname = "games";
  9.  
  10. // Create connection
  11. $conn = new mysqli($servername, $username, $password, $dbname);
  12. // Check connection
  13. if ($conn->connect_error) {
  14. die("Connection failed: " . $conn->connect_error);
  15. }
  16. ?>
  17. <div id="Top_Box">
  18. <span> Welcome to Weirdgames.com! </span>
  19. <img id="Logo" src="../images/Logo.png"></img>
  20. </div>
  21. <div id="Toolbar">
  22. <ul>
  23. <li id="toolbar_text"> <a href="Search_Game.php"> Back to search game!</a>
  24. <a href="#"> </a>
  25. </li>
  26. </ul>
  27. </div>
  28.  
  29. <div id="Gamepic">
  30. <?php
  31. $result = mysql_query("SELECT* FROM games");
  32. while ($data = mysql_fetch_assoc($result))
  33. {
  34. echo '<figure>';
  35. echo '<li style="opacity: 1; top: 0.05px; left: 0px; transform: matrix(1, 0, 0, 1, 0, 0);">';
  36. echo '<a href="../Gamedetail_Battlefront.php?num='.$data["Name"].'">';
  37. echo '<img src="../images'.$data["Name"].'.jpg" align="left"></img>';
  38. echo '</a>';
  39. echo '<p class="storeresults">'.$data["Name"].'</p>';
  40. echo '</li>';
  41. echo '</figure>';
  42. };
  43. $cart = array(
  44. 'Game' => $data["Name"],
  45.  
  46. );
  47.  
  48. $file_str = serialize($cart);
  49. file_put_contents('cart.ini', $cart);
  50. ?>
  51. </div>
  52. <div id="Infobox">
  53.  
  54. <?php
  55. $conn = new mysqli("localhost", "root", "usbw", "games");
  56.  
  57. mysql_select_db('games');
  58. $sql = 'SELECT' .$data["Name"].'FROM games';
  59. $result = mysql_query($sql) or die(mysql_error());
  60. $row = mysql_fetch_assoc($result);
  61. print_r($row);
  62. ?>
  63.  
  64. </div>
  65.  
  66. <div>
  67. <form method="post" action="cart.php">
  68. <input type="submit" name="buy it!" value="buy it!"/>
  69. </form>
  70. </div>
  71.  
  72.  
  73.  
  74. </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement