I know HTML and CSS, I just started PHP today. I'm trying to make a quiz for my school, and I'm getting this error. I'm lost. Can someone tell me where I went wrong?
Index.html page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="results.php" method="post">
Question 1: Do you like working with your hands?<br />
<input type="radio" name="q1" value="yes" />Yes<br />
<input type="radio" name="q1" value="no" />No<br />
Question 2: Do you like technology?<br />
<input type="radio" name="q2" value="yes" />Yes<br />
<input type="radio" name="q2" value="no" />No<br />
Question 3: Do you like wood?<br />
<input type="radio" name="q3" value="yes" />Yes<br />
<input type="radio" name="q3" value="no" />No<br />
Question 4: Do you like stone?<br />
<input type="radio" name="q4" value="yes" />Yes<br />
<input type="radio" name="q4" value="no" />No<br />
Question 5: Do you like outside?<br />
<input type="radio" name="q5" value="yes" />Yes<br />
<input type="radio" name="q5" value="no" />No<br />
Question 6: Do you like hammering nails?<br />
<input type="radio" name="q6" value="yes" />Yes<br />
<input type="radio" name="q6" value="no" />No<br />
<input type="submit" value="Determine your shop" />
</form>
</body>
</html>
Results.php Page
<html>
<head>
<title>Your results</title>
<?php
$score = 0;
if ($_POST['q1'] == 'yes')
$score = $score + 1;
if ($_POST['q2'] == 'yes')
$score = $score + 1;
if ($_POST['q3'] == 'yes')
$score = $score + 1;
if ($_POST['q4'] == 'yes')
$score = $score + 1;
if ($_POST['q5'] == 'yes')
$score = $score + 1;
if ($_POST['q6'] == 'yes')
$score = $score + 1;
?>
</head>
<body>
<h1>Here is your results</h1>
<?php
echo 'Your coolness score was ' . $score . '/5<br><br>';
if ($score <= 2)
echo 'You are not very cool!';
else if ($score == 3)
echo 'Congratulations, a perfect score!';
else
echo 'Not bad, you scored average';
?>
</body>
</html>