Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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>How well do you know this Artist?</title>
- <link rel="stylesheet" type="text/css" href="php.css" />
- </head>
- <body>
- <div id='body'>
- <div id='pagewrap'>
- <div id='wherethequestionsgo'>
- <?php
- if(@$_POST['attempted'] == 'true')
- {
- //What is run if attempted is true
- $score = 0;
- $totalScore = 0;
- $totalScore+=1;
- if(@$_POST['Q1'] == 'Reggae')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q2'] == 'TrenchTown')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q3'] == '1945')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q4'] == 'freedom')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q5'] == '300m')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q6'] == '11')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q7'] == 'religion')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q8'] == 'TLB')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q9'] == 'NWNC')
- {
- echo "";
- $score += 1;
- }
- //
- $totalScore+=1;
- if(@$_POST['Q10'] == 'Cendella')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q11'] == 'Norval')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q12'] == 'PTBW')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q13'] == 'OLPC')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q14'] == '13')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q15'] == '6')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q16'] == '6')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q17'] == 'bob')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q18'] == '17')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q19'] == 'Island')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q20'] == 'damian')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q21'] == 'Guava Jelly')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q22'] == '1976')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q23'] == 'false')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q24'] == 'soccer')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q25'] == '2001')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q26'] == '1994')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q27'] == '36')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q28'] == 'Nesta Robert Marley')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q29'] == 'Cancer')
- {
- echo "";
- $score += 1;
- }
- $totalScore+=1;
- if(@$_POST['Q30'] == 'MoneyCantBuyLove')
- {
- echo "";
- $score += 1;
- }
- echo '<h2>Congratulations <br>';
- echo '<h1><b>You scored $score out of $totalScore</b> </h1>';
- echo '';
- }
- else
- {
- //What is run if attempted is false
- echo
- "<form action='phpassignment.php' method='post'/>
- <input type='hidden' name='attempted' value='true'/>";
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>What kind of music did Marley create?: </h6>
- <h6><input type='radio' name='Q1' value='Pop'>Pop</h6>
- <h6><input type='radio' name='Q1' value='Rock'>Rock</h6>
- <h6><input type='radio' name='Q1' value='Reggae'>Reggae</h6>
- <h6> <input type='radio' name='Q1' value='Rap' />Rap </h6>";
- break;
- case 2:echo" <h6>Where did he grow up in?:</h6>
- <h6><input type='radio' name='Q2' value='Australia' />Australia</h6>
- <h6><input type='radio' name='Q2' value='England' />England</h6>
- <h6><input type='radio' name='Q2' value='TrenchTown' />Trench Town</h6>
- <h6><input type='radio' name='Q2' value='papuaNewGuinea' />Papua New Guinea</h6>";
- break;
- case 3:echo" <h6>When was he born?:</h6>
- <h6><input type='radio' name='Q3' value='1975' />1975</h6>
- <h6><input type='radio' name='Q3' value='1949' />1949</h6>
- <h6><input type='radio' name='Q3' value='1945' />1945</h6>
- <h6><input type='radio' name='Q3' value='1943' />1943</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>How did Marley Inspire Others?:</h6>
- <h6><input type='radio' name='Q4' value='pot' />His love for Marijuana</h6>
- <h6><input type='radio' name='Q4' value='voice' />The way he sung</h6>
- <h6><input type='radio' name='Q4' value='freedom' />His strong belief in freedom</h6>
- <h6><input type='radio' name='Q4' value='Clothing' />His rad style of clothing</h6>";
- break;
- case 2:echo" <h6>How many Albums has Bob Marley sold in his time?:</h6>
- <h6><input type='radio' name='Q5' value='200k' />200,000</h6>
- <h6><input type='radio' name='Q5' value='1m' />1,000,000 (1 Million)</h6>
- <h6><input type='radio' name='Q5' value='20m' />25,000,000 (25 Million)</h6>
- <h6><input type='radio' name='Q5' value='300m' />300,000,000 (300 Million)</h6> ";
- break;
- case 3:echo" <h6>How many albums has Marley released?:</h6>
- <h6><input type='radio' name='Q6' value='16' />Sixteen (16)</h6>
- <h6><input type='radio' name='Q6' value='5' />Five (5)</h6>
- <h6><input type='radio' name='Q6' value='3' />Three (3)</h6>
- <h6><input type='radio' name='Q6' value='24' />Twenty-Four (24)</h6> ";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo"<h6>Why did Bob Marley have dreadlocks?:</h6>
- <h6><input type='radio' name='Q7' value='cool' />Because he wanted Swag</h6>
- <h6><input type='radio' name='Q7' value='fashion' />That was the going fashion</h6>
- <h6><input type='radio' name='Q7' value='religion' />His Religion</h6>
- <h6><input type='radio' name='Q7' value='girls' />To get the girls</h6>";
- break;
- case 2:echo" <h6>'Because every little thing is going to be alright' What song is this line from?:</h6>
- <h6><input type='radio' name='Q8' value='TLB' />Three Little Birds</h6>
- <h6><input type='radio' name='Q8' value='DWBH' />Don't Worry Be Happy</h6>
- <h6><input type='radio' name='Q8' value='BS' />Buffalo Soldier</h6>
- <h6><input type='radio' name='Q8' value='RS' />Redemption Song</h6>";
- break;
- case 3:echo" <h6>''And then Georgie would make the fire light, log wood burnin' through the night' What song is this from?:</h6>
- <h6><input type='radio' name='Q9' value='OL' />One Love</h6>
- <h6><input type='radio' name='Q9' value='DWBH' />Don't Worry Be Happy</h6>
- <h6><input type='radio' name='Q9' value='NWNC' />No Woman, No Cry</h6>
- <h6><input type='radio' name='Q9' value='RS' />Redemption Song</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>What was Bob Marley's mother's name?:</h6>
- <h6><input type='radio' name='Q10' value='linda' />linda</h6>
- <h6><input type='radio' name='Q10' value='Cendella' />Cedella</h6>
- <h6><input type='radio' name='Q10' value='Mandella' />Mandella</h6>
- <h6><input type='radio' name='Q10' value='Maud' />Maud</h6>";
- break;
- case 2:echo" <h6>Who was Bob Marley's father?:</h6>
- <h6><input type='radio' name='Q11' value='noDad' />He had no father</h6>
- <h6><input type='radio' name='Q11' value='Ziggy' />Ziggy</h6>
- <h6><input type='radio' name='Q11' value='damian' />damian</h6>
- <h6><input type='radio' name='Q11' value='Norval' />Norval</h6> ";
- break;
- case 3:echo" <h6>Who was in the Wailers with Bob Marley?:</h6>
- <h6><input type='radio' name='Q12' value='PTBW' />Peter Tosh and Bunny Wailer</h6>
- <h6><input type='radio' name='Q12' value='BTPW' />Bunny Tosh and Peter Wailer</h6>
- <h6><input type='radio' name='Q12' value='BWPW' />Bunny Wailer and Peter Wallce</h6>
- <h6><input type='radio' name='Q12' value='NickiWebster' />Nicki Webster</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>In 1978, Bob Marley performed at another political concert in Jamaica set up in an effort to calm warring parties, what was the name of the concert?:</h6>
- <h6><input type='radio' name='Q13' value='420' />420 Love</h6>
- <h6><input type='radio' name='Q13' value='OLPC' />One Love Peace Concert</h6>
- <h6><input type='radio' name='Q13' value='ImBobMarley' />Im Bob Marley</h6>
- <h6><input type='radio' name='Q13' value='Reggae' />Reggae Festival</h6> ";
- break;
- case 2:echo" <h6>How many children does Bob Marley Have?: </h6>
- <h6><input type='radio' name='Q14' value='13' />13</h6>
- <h6><input type='radio' name='Q14' value='3' />3</h6>
- <h6><input type='radio' name='Q14' value='2' />2</h6>
- <h6><input type='radio' name='Q14' value='Nokids' />He didn't have Kids</h6>";
- break;
- case 3:echo" <h6>How many Son's Did he have?: </h6>
- <h6><input type='radio' name='Q15' value='6' />6</h6>
- <h6><input type='radio' name='Q15' value='3' />3</h6>
- <h6><input type='radio' name='Q15' value='2' />2</h6>
- <h6><input type='radio' name='Q15' value='0' />He didn't have any Sons</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>How many Son's Did he have?: </h6>
- <h6><input type='radio' name='Q16' value='6' />6</h6>
- <h6><input type='radio' name='Q16' value='3' />3</h6>
- <h6><input type='radio' name='Q16' value='2' />2</h6>
- <h6><input type='radio' name='Q16' value='0' />He didn't have any Sons</h6>";
- break;
- case 2:echo" <div align='left'>
- <h6>Which of these pictures is bob marley?: </h6>
- <input type='radio' name='Q17' value='bob' /><img src='bobforq.jpg' />
- <input type='radio' name='Q17' value='slowburn' /><img src='slowburnforq.jpg' /> <br />
- <input type='radio' name='Q17' value='depp' /><img src='johnnyforq.jpg' />
- <input type='radio' name='Q17' value='ziggy' /><img src='ziggyforq.jpg' />
- </div>";
- break;
- case 3:echo" <h6>How old was Marley when he cut his first record, Judge Not?: </h6>
- <h6><input type='radio' name='Q18' value='10' />Ten (10)</h6>
- <h6><input type='radio' name='Q18' value='27' />Twenty-Seven (27)</h6>
- <h6><input type='radio' name='Q18' value='28' />Twenty-Eight (28)</h6>
- <h6><input type='radio' name='Q18' value='17' />Seventeen (17)</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6><input type='radio' name='Q19' value='WoamnNoCry' />No Woman No Cry</h6>
- <h6><input type='radio' name='Q19' value='Marley' />Bob Marley Records</h6>
- <h6><input type='radio' name='Q19' value='Island' />Island Records</h6>
- <h6><input type='radio' name='Q19' value='Wailers' />The Wailers</h6>";
- break;
- case 2:echo"<h6>Which of Bob Marley’s sons was nicknamed 'Jr. Gong'?:</h6>
- <h6><input type='radio' name='Q20' value='ziggy' />Ziggy</h6>
- <h6><input type='radio' name='Q20' value='damian' />Damian</h6>
- <h6><input type='radio' name='Q20' value='Stephen' />Stephen</h6>
- <h6><input type='radio' name='Q20' value='Rohan' />Rohan</h6>";
- break;
- case 3:echo"<h6>What Bob Marley hit was recorded by Barbara Streisand?:</h6>
- <h6><input type='radio' name='Q21' value='Guava Jelly' />“Guava Jelly” </h6>
- <h6><input type='radio' name='Q21' value='One Love' />One Love</h6>
- <h6><input type='radio' name='Q21' value='BuffaloSoldier' />Buffalo Soldier</h6>
- <h6><input type='radio' name='Q21' value='ThreeLittleBirds' />Three Little Birds</h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo" <h6>What year did some person try to murder Bob Marley?:</h6>
- <h6><input type='radio' name='Q22' value='1976' />1976</h6>
- <h6><input type='radio' name='Q22' value='1986' />1986</h6>
- <h6><input type='radio' name='Q22' value='2013' />2013</h6>
- <h6><input type='radio' name='Q22' value='2000 b.c' />2000 B.C</h6>";
- break;
- case 2:echo" <h6>Bob Marley's July 4 birthday is a national holiday in Jamaica (true or false):</h6>
- <h6><input type='radio' name='Q23' value='true' />True</h6>
- <h6><input type='radio' name='Q23' value='false' />False</h6>";
- break;
- case 3:echo" <h6>What was Bob's Favourite Sport?</h6>
- <h6><input type='text' name='Q24' value='' /></h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo"<h6>What year did Bob Marley receive a star on the Hollywood Walk of Fame?:</h6>
- <h6><input type='radio' name='Q25' value='1999' />1999</h6>
- <h6><input type='radio' name='Q25' value='2001' />2001</h6>
- <h6><input type='radio' name='Q25' value='1976' />1976</h6>
- <h6><input type='radio' name='Q25' value='2009' />2009</h6>";
- break;
- case 2:echo" <h6>What year was Bob Marley inducted into the Rock and Roll Hall of Fame?</h6>
- <h6><input type='radio' name='Q26' value='1994' />19944</h6>
- <h6><input type='radio' name='Q26' value='2001' />2001</h6>
- <h6><input type='radio' name='Q26' value='1974' />1974</h6>
- <h6><input type='radio' name='Q26' value='1956' />1956</h6>";
- break;
- case 3:echo" <h6>How old was Bob?</h6>
- <h6><input type='text' name='Q27' value='' /></h6>";
- break;
- }
- $randomNumber = rand(1,3) ;
- switch ($randomNumber)
- {
- case 1:echo"<h6>What is Bob Marley's Full Name?</h6>
- <h6><input type='radio' name='Q28' value='Nesta Robert Marley' />Nesta Robert Marley</h6>
- <h6><input type='radio' name='Q28' value='Bob Marley' />Bob Marley</h6>
- <h6><input type='radio' name='Q28' value='Robert Marley' />Robert Marley</h6>
- <h6><input type='radio' name='Q28' value='Ziggy Marley' />Ziggy Marley</h6>";
- break;
- case 2:echo" <h6>How did Bob Marley Die?</h6>
- <h6><input type='radio' name='Q29' value='DidntDie' />He's Not dead?</h6>
- <h6><input type='radio' name='Q29' value='pot' />Over use of Marijuana</h6>
- <h6><input type='radio' name='Q29' value='hedied' />He died?</h6>
- <h6><input type='radio' name='Q29' value='Cancer' />Cancer</h6>";
- break;
- case 3:echo"<h6>What were Bob Marley's last words to his son Stephen?</h6>
- <h6><input type='radio' name='Q30' value='420Blaze' />420 Blaze it</h6>
- <h6><input type='radio' name='Q30' value='MoneyCantBuyLove' />Money Can't Buy Love</h6>
- <h6><input type='radio' name='Q30' value='One Love' />One Love</h6>
- <h6><input type='radio' name='Q30' value='MusicIsEverything' />Music Is Everything</h6> ";
- break;
- }
- echo "</br>
- </br>
- <input type='submit' value='How well do you know Bob?'/>
- </br>
- </form>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement