Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--<?php include('database.php'); ?>-->
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Teh Games Questionaire</title>
- </head>
- <style>
- body {background-color:lightgrey;}
- </style>
- <body>
- <h1 style="color:blue;">This is a Blue Heading</h1>
- <form method="post">
- <fieldset>
- <?php
- $host='cyberfyre.com.mysql';
- $user='cyberfyre_com';
- $password='SEt8iLhh';
- $databaseName='cyberfyre_com';
- $conn = mysqli_connect($host, $user, $password, $databaseName);
- if ($conn->connect_error)
- {
- die("Connection failed: " . $conn->connect_error);
- }
- echo "Connected successfully\r\n";
- ?>
- </fieldset>
- </form>
- <form method="post">
- <fieldset>
- What is your name<br>
- Name: <input type="text" name="Name"/><br><br>
- What is your email?<br>
- Email: <input type="text" name="Email"/><br><br>
- What age range do you belong to?<br>
- <input type="radio" name="Age" value="Rating 3s"/> <7.<br>
- <input type="radio" name="Age" value="Upto Rating 7s"/> 7-11.<br>
- <input type="radio" name="Age" value="Upto Rating 12s"/> 12-15.<br>
- <input type="radio" name="Age" value="Upto Rating 16s"/> 16-17.<br>
- <input type="radio" name="Age" value="Rating 18s"/> 18+.<br><br>
- What is your favourite video-game genre?<br>
- <input type="radio" name="FavGenre" value="RPG"/> Role Playing Game.<br>
- <input type="radio" name="FavGenre" value="Action"/> Action.<br>
- <input type="radio" name="FavGenre" value="MMORPG"/> Massive Multiplayer Online Role Playing Game.<br>
- <input type="radio" name="FavGenre" value="Strategy"/> Strategy.<br>
- <input type="radio" name="FavGenre" value="Simulation"/> Simulation.<br>
- <input type="radio" name="FavGenre" value="Adventure"/> Adventure.<br>
- <input type="radio" name="FavGenre" value="Sports"/> Sports.<br>
- <input type="radio" name="FavGenre" value="Action-Adventure"/> Action-Adventure.<br><br>
- What device do you usually play videogames on?<br>
- <input type="radio" name="DeviceQ" value="PC"/> PC.<br>
- <input type="radio" name="DeviceQ" value="PS4"/> Playstation 4.<br>
- <input type="radio" name="DeviceQ" value="XBOXONE"/> Xbox One.<br>
- <input type="radio" name="DeviceQ" value="Wii U"/> Nintendo Wii U.<br>
- <input type="radio" name="DeviceQ" value="3DS"/> Nintendo 3DS.<br>
- <input type="radio" name="DeviceQ" value="Vita"/> Playstation Vita<br><br>
- Which do you enjoy more: Single Player or Multiplayer?<br>
- <input type="radio" name="SingOrMulti" value="Single-Player"/> Single-Player.<br>
- <input type="radio" name="SingOrMulti" value="Multi-Player"/> Multi-Player.<br><br>
- If you play multiplayer games, do you prefer local or online multiplayer?<br>
- <input type="radio" name="locOrOnline" value="Online"/> Online.<br>
- <input type="radio" name="locOrOnline" value="Local"/> Local.<br><br>
- Do you prefer open world games or ones where the path is chosen for you?<br>
- <input type="radio" name="OpenWQ" value="open"/> Open World.<br>
- <input type="radio" name="OpenWQ" value="pathed"/> Path is chosen for you.<br>
- <input type="radio" name="OpenWQ" value="notsure"/> No Preference.<br><br>
- Do you prefer a game that reacts to your actions or one that is heavily linear?<br>
- <input type="radio" name="actionorLinear" value="yes"/> Reacts to my actions.<br>
- <input type="radio" name="actionorLinear" value="no"/> One that is linear.<br>
- <input type="radio" name="actionorLinear" value="same"/> No Preference.<br><br>
- Do you prefer simple games or ones with a challenge?<br>
- <input type="radio" name="challengeQ" value="Simple"/> Simple.<br>
- <input type="radio" name="challengeQ" value="Challenging"/> Challenging.<br><br>
- How often do you spend playing games in each sitting?<br>
- <input type="radio" name="gameplayTimeQ" value="<1 hr"/> <1 hr.<br>
- <input type="radio" name="gameplayTimeQ" value="1-2 hrs"/> 1-2 hrs.<br>
- <input type="radio" name="gameplayTimeQ" value="2-3 hrs"/> 2-3 hrs.<br>
- <input type="radio" name="gameplayTimeQ" value="3-5 hrs"/> 3-5 hrs.<br>
- <input type="radio" name="gameplayTimeQ" value="5+ hrs"/> 5+ hrs.<br><br>
- What is more important to you gameplay or graphics?<br>
- <input type="radio" name="JoshQ1" value="yes"/> Gameplay.<br>
- <input type="radio" name="JoshQ1" value="no"/> Graphics.<br><br>
- Do you prefer playing independent games or AAA titles?<br>
- <input type="radio" name="JoshQ2" value="yes"/> Independant.<br>
- <input type="radio" name="JoshQ2" value="no"/> AAA.<br><br>
- Do you enjoy realistic simulation games or more fictional ones?<br>
- <input type="radio" name="JoshQ3" value="yes"/> Simulation.<br>
- <input type="radio" name="JoshQ3" value="no"/> Fictional.<br><br>
- Do you prefer first person or third person in game?<br>
- <input type="radio" name="JoshQ4" value="yes"/> First Person.<br>
- <input type="radio" name="JoshQ4" value="no"/> Third Person.<br><br>
- Have you ever modded a game, or seen a modded game(e.g. Skyrim, G-Mod)?<br>
- <input type="radio" name="mod1" value="yes"/> Yes.<br>
- <input type="radio" name="mod1" value="no"/> No.<br><br>
- Do you think modded games are good enough to buy a pc over console?<br>
- <input type="radio" name="mod2" value="yes"/> Yes.<br>
- <input type="radio" name="mod2" value="no"/> No.<br><br>
- Do you like “competetive games” ? e.g. DotA, CS:GO, Starcraft<br>
- <input type="radio" name="comp1" value="yes"/> Yes.<br>
- <input type="radio" name="comp1" value="no"/> No.<br><br>
- Have Cheaters/Hackers ever put you off playing game?<br>
- <input type="radio" name="cheatersQ" value="yes"/> Yes.<br>
- <input type="radio" name="cheatersQ" value="no"/> No.<br><br>
- How many hours do you play games over the course of a week?<br>
- <input type="radio" name="WkTime" value="60+"/> 60+ hours a week.<br>
- <input type="radio" name="WkTime" value="40-59"/> 40-59 hours a week.<br>
- <input type="radio" name="WkTime" value="30-39"/> 30-39 hours a week.<br>
- <input type="radio" name="WkTime" value="20-29"/> 20-29 hours a week.<br>
- <input type="radio" name="WkTime" value="15-19"/> 15-19 hours a week.<br>
- <input type="radio" name="WkTime" value="10-14"/> 10-14 hours a week.<br>
- <input type="radio" name="WkTime" value="5-9"/> 5-9 hours a week.<br>
- <input type="radio" name="WkTime" value="Less than 4"/> Less than 4 hours a week.<br><br>
- Do you have any interest in purchasing DLC (Downloadable Content)?<br>
- <input type="radio" name="DLCInterest" value="Very Interested"/> Very Interested.<br>
- <input type="radio" name="DLCInterest" value="Slightly Interested"/> Slightly Interested.<br>
- <input type="radio" name="DLCInterest" value="disinterested"/> Disinterested.<br>
- <input type="radio" name="DLCInterest" value="Slightly Interested"/> Very disinterested.<br>
- <input type="radio" name="DLCInterest" value="Depends"/> Depends on game.<br><br>
- Which platforms do you purchase most games from?<br>
- <input type="radio" name="GamePlatform" value="Retail"/> Retail stores such as Game.<br>
- <input type="radio" name="GamePlatform" value="Online physical"/> Physical Copies from online retailers.<br>
- <input type="radio" name="GamePlatform" value="online"/> Online reatailers such as Steam or Green Man Gaming that provide digital copies.<br>
- <input type="radio" name="GamePlatform" value="Developer"/> Purchase games straight from the developer.<br>
- <input type="radio" name="GamePlatform" value="Console marketplace"/> Appropriate console marketplace, such as the Xbox live marketplace .<br>
- <input type="radio" name="GamePlatform" value="second hand"/> from pre-owned sources such as friends or ebay.<br><br>
- Would you be willing to pay a small subscription fee to play a game?<br>
- <input type="radio" name="Subscription" value="Yes"/> Yes.<br>
- <input type="radio" name="Subscription" value="No"/> No.<br><br>
- Would you ever consider changing console or device?<br>
- <input type="radio" name="changeQ" value="Yes"/> Yes.<br>
- <input type="radio" name="changeQ" value="No"/> No.<br><br>
- Do reviews influence your game purchases?<br>
- <input type="radio" name="reviewQ" value="Yes"> Yes.<br>
- <input type="radio" name="reviewQ" value="No"> No.<br><br>
- </form>
- <input type="submit" name="submit" value="Submit"/><br>
- </fieldset>
- </form>
- <?php
- if (isset($_POST['submit']))
- {
- if (mysqli_ping($conn))
- {
- echo "Pinged Successfully | ";
- }
- else
- {
- echo "Error: ". mysqli_error($conn);
- die();
- }
- if(empty($_POST['Name']) and empty($_POST['Email']) and empty($_POST['Age']) and empty($_POST['FavGenre']) and empty($_POST['DeviceQ']) and empty($_POST['SingOrMulti']) and empty($_POST['locOrOnline']) and
- empty($_POST['OpenWQ']) and empty($_POST['actionorLinear']) and empty($_POST['challengeQ']) and empty($_POST['gameplayTimeQ']) and
- empty($_POST['JoshQ1']) and empty($_POST['JoshQ2']) and empty($_POST['JoshQ3']) and empty($_POST['JoshQ4']) and
- empty($_POST['mod1']) and empty($_POST['mod2']) and empty($_POST['comp1']) and empty($_POST['cheatersQ']) and
- empty($_POST['WkTime']) and empty($_POST['DLCInterest']) and empty($_POST['GamePlatform']) and empty($_POST['Subscription']) and empty($_POST['changeQ']) and empty($_POST['reviewQ']))
- echo "You have missed questions"; // Displaying Selected Value
- else
- {
- $_Name = $_POST["Name"];
- $_Email = $_POST["Email"];
- $_Age = $_POST['Age'];
- $_FavGenre = $_POST['FavGenre'];
- $_DeviceQ = $_POST['DeviceQ'];
- $_SingOrMulti = $_POST['SingOrMulti'];
- $_locOrOnline = $_POST['locOrOnline'];
- $_OpenWQ = $_POST['OpenWQ'];
- $_actionorLinear = $_POST['actionorLinear'];
- $_challengeQ = $_POST['challengeQ'];
- $_gameplayTimeQ = $_POST['gameplayTimeQ'];
- $_JoshQ1 = $_POST['JoshQ1'];
- $_JoshQ2 = $_POST['JoshQ2'];
- $_JoshQ3 = $_POST['JoshQ3'];
- $_JoshQ4 = $_POST['JoshQ4'];
- $_mod1 = $_POST['mod1'];
- $_mod2 = $_POST['mod2'];
- $_comp1 = $_POST['comp1'];
- $_cheatersQ = $_POST['cheatersQ'];
- $_WkTime = $_POST['WkTime'];
- $_DLCInterest = $_POST['DLCInterest'];
- $_GamePlatform = $_POST['GamePlatform'];
- $_Subscription = $_POST['Subscription'];
- $_changeQ = $_POST['changeQ'];
- $_reviewQ = $_POST['reviewQ'];
- $sql = "INSERT INTO Responses (Name,Email,Age,FavGenre,DeviceQ,SingOrMulti,locOrOnline,OpenWQ,actionorLinear,challengeQ,gameplayTimeQ,JoshQ1,JoshQ2,JoshQ3,JoshQ4,
- mod1,mod2,comp1,cheatersQ,WkTime,DLCInterest,GamePlatform,Subscription,changeQ,reviewQ) VALUES ('$_Name','$_Email','$_Age','$_FavGenre','$_DeviceQ',
- '$_SingOrMulti','$_locOrOnline','$_OpenWQ','$_actionorLinear','$_challengeQ','$_gameplayTimeQ','$_JoshQ1','$_JoshQ2','$_JoshQ3',
- '$_JoshQ4','$_mod1','$_mod2','$_comp1','$_cheatersQ','$_WkTime','$_DLCInterest','$_GamePlatform','$_Subscription','$_changeQ', '$_reviewQ')";
- //$sql = "INSERT INTO Responses (Name,Email) VALUES ('$_Name','$_Email')";
- if (mysqli_query($conn, $sql))
- {
- echo "New record created successfully";
- }
- else
- {
- echo "Error: " . $sql . "\n" . $conn->error;
- }
- $sqlGetAge = "SELECT Name, Age FROM Responses WHERE Email = '$_Email'";
- $result = mysqli_query($conn, $sqlGetAge) or die($sqlGetAge.mysql_error());
- if (mysqli_num_rows($result) > 0) {
- // output data of each row
- while($row = mysqli_fetch_assoc($result))
- {
- echo " name: " . $row["Name"]. " - age: " . $row["Age"];
- if ($row["Age"] = 'Rating 3s')
- {
- //echo " name: " . $row["Name"]. " - age: " . $row["Age"];
- mail($_Email,'Product Suggestions For '. $row["Name"], "Hello, " . $row["Name"].
- " | Age: " . $row["Age"]. " | Thankyou for visiting Teh Games and completing the survey,
- here are the some games that we think you might like: FlintSmash! The game is set on
- the fictional Suthon Island. It is said to hold the power to protect the world from harm,
- which it was protected by a large palm tree and watched over by the nature spirits in the island.
- Before the game, the antagonist, Omminus, takes over the island in order to rule the world. As a result,
- the palm tree begins to wither and the princess becomes ill. The leader of the nature spirits recalls an
- old legend about a hero using sacred pearls to restore the peace. He finds the treasure chest where the
- hero, Zip, resides. Zip, and a friend from the neighboring Eesturn Island, Pip, set out to retrieve the
- pearls and defeat Omminus.");
- }
- elseif ($row["Age"] = 'Upto Rating 7s')
- {
- //echo "name: " . $row["Name"]. " - age: " . $row["Age"];
- mail($_Email,'Product Suggestions For '. $row["Name"], "Hello, " . $row["Name"].
- " | Age: " . $row["Age"]. " | Thankyou for visiting Teh Games and completing the survey,
- here are the some games that we think you might like: Lego Harry Potter Series!
- Lego Harry Potter is a Lego theme based on the films of the Harry Potter series.
- Lego models of important scenes, vehicles and characters were made for the first
- six films and all the books released. The first sets appeared in 2001, to coincide
- with the release of the first film Harry Potter and the Philosopher's Stone (Harry
- Potter and the Sorcerer's Stone in the United States). Subsequent sets were released
- alongside the new films, up until Harry Potter and the Order of the Phoenix.
- The line then went dormant for three years..");
- }
- elseif ($row["Age"] = 'Upto Rating 12s')
- {
- //echo "name: " . $row["Name"]. " - age: " . $row["Age"];
- mail($_Email,'Product Suggestions For '. $row["Name"], "Hello, " . $row["Name"].
- " | Age: " . $row["Age"]. " | Thankyou for visiting Teh Games and completing the survey,
- here are the some games that we think you might like: Super Smash Bro Brawl! Following its predecessors,
- Brawl uses a battle system unlike that of typical fighting games. Players can
- choose from a large selection of characters, each attempting to knock their
- opponents off the screen as they fight on various stages. The characters in
- Brawl include most of the same ones as the predecessors, such as the well-known
- Mario and Pikachu. Instead of using traditional health bars that start at a maximum
- value and lose value, Brawl characters start the game with 0%; the value rises as
- they take damage and may rise over 100% to a maximum of 999%. As a character's
- percentage increases, the character flies further back when hit. When a character
- is knocked beyond a stage's boundary and disappears from the screen, the character
- loses either a life, a point, or coins, depending on the mode of play. Brawl
- includes a function which allows players to create profiles with personalized
- button configurations for each control method along with their chosen username.");
- }
- elseif ($row["Age"] = 'Upto Rating 16s')
- {
- //echo "name: " . $row["Name"]. " - age: " . $row["Age"];
- mail($_Email,'Product Suggestions For '. $row["Name"], "Hello, " . $row["Name"].
- " | Age: " . $row["Age"]. " | Thankyou for visiting Teh Games and completing the survey,
- here are the some games that we think you might like: Mirror's Edge Catalyst!
- Mirror's Edge Catalyst is a first-person action-adventure game in which players
- take control of Faith Connors as she progresses through a futuristic city called Glass.
- Similar to the original Mirror's Edge, players traverse the city using aspects of urban
- exploration and parkour movements to complete missions and evade enemies or knock them
- off of their feet. Players can also make use of environmental objects such as zip-lines
- and ledges, and equipment including Mag Rope and Disruptor[3] to travel across buildings.
- When players mark an objective on their map, Faith's 'runner vision' is activated and some
- scenery items automatically highlight in red. These act as guides to lead players towards
- their objective.[4] The use of levels and linear gameplay found in the first Mirror's Edge
- has been replaced with an open-world, free-roaming environment. This gives players more
- freedom in traversal, allowing for the use of multiple paths to reach one's objective.
- In addition to the campaign's mission, side activities such as time trials, races and
- environmental puzzles will be featured. DICE also promises that no loading screen will
- be included in the final game, allowing for freedom to travel within all areas without
- loading delays. Additionally, items called Gridleaks can be found across the world that
- can be collected by players.");
- }
- elseif ($row["Age"] = 'Rating 18s')
- {
- //echo "name: " . $row["Name"]. " - age: " . $row["Age"];
- mail($_Email,'Product Suggestions For '. $row["Name"], "Hello, " . $row["Name"].
- " | Age: " . $row["Age"]. " | Thankyou for visiting Teh Games and completing the survey,
- here are the some games that we think you might like: Battlefield 4! Battlefield 4 is a
- 2013 first-person shooter video game developed by Swedish video game developer EA Digital
- Illusions CE (DICE) and published by Electronic Arts. It is a sequel to 2011's Battlefield
- 3 and was released on October 29, 2013 in North America, October 31, 2013 in Australia,
- November 1, 2013 in Europe and New Zealand and November 7, 2013 in Japan for Microsoft Windows,
- PlayStation 3, PlayStation 4, Xbox 360 and Xbox One. Battlefield 4 was met with positive reception.
- It was praised for its multiplayer mode, gameplay and graphics,
- but was also criticized for its short and shallow single-player campaign mode,
- and for its numerous bugs and glitches. It was a commercial success, selling over 7 million copies.");
- }
- }
- }
- else
- {
- echo "0 results";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement