Server IP : 172.16.15.8 / Your IP : 3.17.166.157 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/akdobrenen/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- Ash Dobrenen Minecraft Survey Project MSInputNewUser.php --> <?php session_start(); $build = $_POST['buildRating']; $mine = $_POST['mineRating']; $fight = $_POST['fightRating']; $red = $_POST['redRating']; $fav = $_POST['favActivity']; $player = $_SESSION['player']; $age = (int)$_SESSION['age']; $_SESSION['build'] = $build; $_SESSION['mine'] = $mine; $_SESSION['fight'] = $fight; $_SESSION['red'] = $red; $_SESSION['fav'] = $fav; $host = 'localhost'; $user = 'akdobrenen'; $passwd = 'CS389'; $database = 'akdobrenen'; $connect = mysqli_connect($host, $user, $passwd); if($age <= 12) { $query = "insert into 12SURVIVAL values ('$player', $age, $build, $mine, $fight, $red, '$fav')"; // print "The query is <i> $query </i> "; mysqli_select_db($connect, $database); $result_id = mysqli_query($connect, $query); if($result_id) { // print "Input Sucsessful to 12 and under database"; } else print 'Fail for 12 and under database.<P>'; include("MS12Display.php"); mysqli_close($connect); } else if ($age > 12 && $age < 18) { $query = "insert into 18SURVIVAL values ('$player', $age, $build, $mine, $fight, $red, '$fav')"; // print "The query is <i> $query </i> "; mysqli_select_db($connect, $database); $result_id = mysqli_query($connect, $query); if($result_id) { // print "Input Sucsessful to 12 to 18 database"; } else print 'Fail for 12 to 18 database.<P>'; include("MS18Display.php"); mysqli_close($connect); } else if ($age >= 18) { $query = "insert into UPSURVIVAL values ('$player', $age, $build, $mine, $fight, $red, '$fav')"; // print "The query is <i> $query </i> "; mysqli_select_db($connect, $database); $result_id = mysqli_query($connect, $query); if($result_id) { // print "Input Sucsessful to 18 and up database"; } else print 'Fail for 18 and up database.<P>'; include("MSUPDisplay.php"); mysqli_close($connect); } ?>