Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?php session_start();?>
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link href="https://fonts.googleapis.com/css?family=Cutive+Mono|Lobster|Raleway+Dots" rel="stylesheet">
<meta name="theme-color" content="#fafafa">
<link href="https://fonts.googleapis.com/css?family=Lora" rel="stylesheet">
<style type="text/css">
.container {
display:flex;
flex-wrap: wrap;
justify-content: center;
margin: 0 auto;
width: 100%;
}
#quiz {
background-color: rgba( 250, 250, 250, 0.6 );
}
h3, h4 {
text-align: center;
}
body {
background-image:url(
img/bg.png);
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
font-family: 'Lora';
}
p {
font-size: 25px;
margin-top:45px;
text-align: center;
}
#whole {
width: 100%;
display: flex;
margin: 0 auto;
}
label {font-family:'Lora';}
</style>
</head>
<body>
<!--[if IE]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<nav>
<ul>
<li id="login">
<a id="login-trigger" href="#">
Log in <span></span>
</a>
<div id="login-content">
<?php if(isset($_SESSION['username'])): ?>
Logged in as <?php echo $_SESSION['username'] ?>. Not you? <a href="logout.php">Log out</a><br>
<style type="text/css">
.form-group {
display:none;
}
</style>
<div id="idk">
<?php echo $_SESSION ['username'] . "'s quizzes:" ?><br>
<a href="index.php">what's your font?</a>
</div>
<?php else: ?>
<style type="text/css">
.form-group {
display:block;
}
</style>
<?php endif; ?>
<form action="login.php" method="post" class="needs-validation" novalidate>
<div class="form-group <?php echo (!empty($username_err)) ? 'has-error' : ''; ?>">
<label>Username</label><br>
<input type="text" name="username" class="form-control" value="<?php echo $username; ?>">
<span class="help-block"><?php echo $username_err; ?></span>
</div>
<div class="form-group <?php echo (!empty($password_err)) ? 'has-error' : ''; ?>">
<label>Password</label><br>
<input type="password" name="password" class="form-control">
<span class="help-block"><?php echo $password_err; ?></span>
</div>
<div class="form-group" class="btn-bg">
<input type="submit" class="btn btn-primary" value="login">
</div>
<div class="form-group">
<span class="reg">No account? <a href="#"> Register here. </a></span>
</div>
</form>
</div>
</li>
</ul>
</nav>
<div class=container>
<div id=quiz class=row>
<p class=col-lg>Fonts can make a strong impression on your projects. <br>Take this short quiz to find out what font suits you!</p>
<form method="post" id="quiz" action="quiz.php" class=col-lg>
<!-- question 1 --->
<h3> Question 1: </h3>
<h4>How old are you? </h4>
<input type="radio" value="Q1A1" name="Q1" <?php if (isset($Q1) && $Q1=="Q1A1") echo "checked";?>required>
less than 18<br>
<input type="radio" value="Q1A2" name="Q1" <?php if (isset($Q1) && $Q1=="Q1A2") echo "checked";?>required>
19-25<br>
<input type="radio" value="Q1A3" name="Q1" <?php if (isset($Q1) && $Q1=="Q1A3") echo "checked";?>required>
26-45 <br>
<input type="radio" value="Q1A4" name="Q1" <?php if (isset($Q1) && $Q1=="Q1A4") echo "checked";?>required>
46-65 <br>
<input type="radio" value="Q1A5" name="Q1" <?php if (isset($Q1) && $Q1=="Q1A5") echo "checked";?>required>
older than 65
<hr>
<!-- question 2 --->
<h3> Question 2: </h3>
<h4>How would you define your handwriting? </h4>
<input type="radio" value="Q2A1" name="Q2" <?php if (isset($Q2) && $Q2=="Q2A1") echo "checked";?>required>
Like a dog got ahold of a pencil<br>
<input type="radio" value="Q2A2" name="Q2" <?php if (isset($Q2) && $Q2=="Q2A2") echo "checked";?>required>
Kindergartener learning to write<br>
<input type="radio" value="Q2A3" name="Q2" <?php if (isset($Q2) && $Q2=="Q2A3") echo "checked";?>required>
Average I guess <br>
<input type="radio" value="Q2A4" name="Q2" <?php if (isset($Q2) && $Q2=="Q2A4") echo "checked";?>required>
Fairly neat <br>
<input type="radio" value="Q2A5" name="Q2" <?php if (isset($Q2) && $Q2=="Q2A5") echo "checked";?>required>
Super precise and organized
<hr>
<!-- question 3 --->
<h3> Question 3: </h3>
<h4>Pick a font that appeals to you: </h4>
<input type="radio" value="Q3A1" name="Q3" <?php if (isset($Q3) && $Q3=="Q3A1") echo "checked";?>required>
<span style="font-family:Roboto; font-size: 32px;">Roboto</span><br>
<input type="radio" value="Q3A2" name="Q3" <?php if (isset($Q3) && $Q3=="Q3A2") echo "checked";?>required>
<span style="font-family:Merriweather; font-size: 32px;"> Merriweather</span><br>
<input type="radio" value="Q3A3" name="Q3" <?php if (isset($Q3) && $Q3=="Q3A3") echo "checked";?>required>
<span style="font-family:Lobster; font-size: 32px;"> Lobster</span><br>
<input type="radio" value="Q3A4" name="Q3" <?php if (isset($Q3) && $Q3=="Q3A4") echo "checked";?>required>
<span style="font-family:Cutive mono; font-size: 32px;"> Cutive mono</span><br>
<input type="radio" value="Q3A5" name="Q3" <?php if (isset($Q3) && $Q3=="Q3A5") echo "checked";?>required>
<span style="font-family:Raleway dots; font-size: 32px;"> Raleway dots</span>
<hr>
<!-- question 4 --->
<h3> Question 4: </h3>
<h4>What's your zodiac sign? </h4>
<input type="radio" value="Q4A1" name="Q4" <?php if (isset($Q4) && $Q4=="Q4A1") echo "checked";?>required>
Fire Sign (Aries, Leo, Sagittarius) <br>
<input type="radio" value="Q4A2" name="Q4" <?php if (isset($Q4) && $Q4=="Q4A2") echo "checked";?>required>
Water sign (Cancer, Scorpio, Pisces)<br>
<input type="radio" value="Q4A3" name="Q4" <?php if (isset($Q4) && $Q4=="Q4A3") echo "checked";?>required>
Air Signs (Libra, Aquarius, Gemini)<br>
<input type="radio" value="Q4A4" name="Q4" <?php if (isset($Q4) && $Q4=="Q4A4") echo "checked";?>required>
Earth Signs (Capricorn, Taurus, Virgo)<br>
<input type="radio" value="Q4A5" name="Q4" <?php if (isset($Q4) && $Q4=="Q4A5") echo "checked";?>required>
I don't know.
<hr>
<!-- question 5 --->
<h3> Question 5: </h3>
<h4>Are you a....</h4>
<input type="radio" value="Q5A1" name="Q5" <?php if (isset($Q5) && $Q5=="Q5A1") echo "checked";?>required>
Cat person <br>
<input type="radio" value="Q5A2" name="Q5" <?php if (isset($Q5) && $Q5=="Q5A2") echo "checked";?>required>
Dog person<br>
<input type="radio" value="Q5A3" name="Q5" <?php if (isset($Q5) && $Q5=="Q5A3") echo "checked";?>required>
Neither<br>
<hr>
<!-- question 6 --->
<h3> Question 6: </h3>
<h4>Pick a soup. </h4>
<input type="radio" value="Q6A1" name="Q6" <?php if (isset($Q6) && $Q6=="Q6A1") echo "checked";?>required>
Minestrone<br>
<input type="radio" value="Q6A2" name="Q6" <?php if (isset($Q6) && $Q6=="Q6A2") echo "checked";?>required>
Chicken Noodle<br>
<input type="radio" value="Q6A3" name="Q6" <?php if (isset($Q6) && $Q6=="Q6A3") echo "checked";?>required>
Miso<br>
<input type="radio" value="Q6A4" name="Q6" <?php if (isset($Q6) && $Q6=="Q6A4") echo "checked";?>required>
Chili<br>
<input type="radio" value="Q6A5" name="Q6" <?php if (isset($Q6) && $Q6=="Q6A5") echo "checked";?>required>
Tomato
<hr>
<!-- question 7 --->
<h3> Question 7: </h3>
<h4>Soup or Salad? </h4>
<input type="radio" value="Q7A1" name="Q7" <?php if (isset($Q7) && $Q7=="Q7A1") echo "checked";?>required>
Yes.<br>
<hr>
<!-- question 8 --->
<h3> Question 8: </h3>
<h4>What is your ideal vacation? </h4>
<input type="radio" value="Q8A1" name="Q8" <?php if (isset($Q8) && $Q8=="Q8A1") echo "checked";?>required>
Snowy Ski Trip<br>
<input type="radio" value="Q8A2" name="Q8" <?php if (isset($Q8) && $Q8=="Q8A2") echo "checked";?>required>
Exotic Safari<br>
<input type="radio" value="Q8A3" name="Q8" <?php if (isset($Q8) && $Q8=="Q8A3") echo "checked";?>required>
Relaxing Beach Getaway<br>
<input type="radio" value="Q8A4" name="Q8" <?php if (isset($Q8) && $Q8=="Q8A4") echo "checked";?>required>
Educational Trip<br>
<input type="radio" value="Q8A5" name="Q8" <?php if (isset($Q8) && $Q8=="Q8A5") echo "checked";?>required>
Staycation
<hr>
<!-- question 9 --->
<h3> Question 9: </h3>
<h4>What is the best type of pasta? </h4>
<input type="radio" value="Q9A1" name="Q9" <?php if (isset($Q9) && $Q9=="Q9A1") echo "checked";?> required>
Penne<br>
<input type="radio" value="Q9A2" name="Q9" <?php if (isset($Q9) && $Q9=="Q9A2") echo "checked";?> required>
Spaghetti<br>
<input type="radio" value="Q9A3" name="Q9" <?php if (isset($Q9) && $Q9=="Q9A3") echo "checked";?> required>
Ravioli<br>
<input type="radio" value="Q9A4" name="Q9" <?php if (isset($Q9) && $Q9=="Q9A4") echo "checked";?> required>
Rigatoni<br>
<input type="radio" value="Q9A5" name="Q9" <?php if (isset($Q9) && $Q9=="Q9A5") echo "checked";?>required>
Rotini
<hr>
<!-- question 10 --->
<h3> Question 10: </h3>
<h4>How is your coffee made? </h4>
<input type="radio" value="Q10A1" name="Q10" <?php if (isset($Q10) && $Q10=="Q10A1") echo "checked";?>required>
Black<br>
<input type="radio" value="Q10A2" name="Q10" <?php if (isset($Q10) && $Q10=="Q10A2") echo "checked";?>required>
Milk but no sugar<br>
<input type="radio" value="Q10A3" name="Q10" <?php if (isset($Q10) && $Q10=="Q10A3") echo "checked";?>required>
Sugar but no milk<br>
<input type="radio" value="Q10A4" name="Q10" <?php if (isset($Q10) && $Q10=="Q10A4") echo "checked";?>required>
A bit of both<br>
<input type="radio" value="Q10A5" name="Q10" <?php if (isset($Q10) && $Q10=="Q10A5") echo "checked";?>required>
I don't drink coffee.
<hr>
<br>
<input type="submit" class="btn" value="Get your result!" id=result>
</form>
</div>
<section id="result-container">
<div id="result"></div>
<div id="error" class="hide">It looks like you missed a question. Please fill in all answers before submitting.</div>
</section>
</div>
</div>
<hr>
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/demo.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/vendor/modernizr-3.7.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<script>
// $(document).foundation();
</script>
</body>
</html>