Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <link type="text/css" rel="stylesheet" href="stylesheet_battlefront.css"/>
- <body>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "usbw";
- $dbname = "games";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- ?>
- <div id="Top_Box">
- <span> Welcome to Weirdgames.com! </span>
- <img id="Logo" src="../images/Logo.png"></img>
- </div>
- <div id="Toolbar">
- <ul>
- <li id="toolbar_text"> <a href="Search_Game.php"> Back to search game!</a>
- <a href="#"> </a>
- </li>
- </ul>
- </div>
- <div id="Gamepic">
- <?php
- $result = mysql_query("SELECT* FROM games");
- while ($data = mysql_fetch_assoc($result))
- {
- echo '<figure>';
- echo '<li style="opacity: 1; top: 0.05px; left: 0px; transform: matrix(1, 0, 0, 1, 0, 0);">';
- echo '<a href="../Gamedetail_Battlefront.php?num='.$data["Name"].'">';
- echo '<img src="../images'.$data["Name"].'.jpg" align="left"></img>';
- echo '</a>';
- echo '<p class="storeresults">'.$data["Name"].'</p>';
- echo '</li>';
- echo '</figure>';
- };
- $cart = array(
- 'Game' => $data["Name"],
- );
- $file_str = serialize($cart);
- file_put_contents('cart.ini', $cart);
- ?>
- </div>
- <div id="Infobox">
- <?php
- $conn = new mysqli("localhost", "root", "usbw", "games");
- mysql_select_db('games');
- $sql = 'SELECT' .$data["Name"].'FROM games';
- $result = mysql_query($sql) or die(mysql_error());
- $row = mysql_fetch_assoc($result);
- print_r($row);
- ?>
- </div>
- <div>
- <form method="post" action="cart.php">
- <input type="submit" name="buy it!" value="buy it!"/>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement