Jump to content


Photo

Quiz Com Banco Dados


  • Faça o login para participar
13 replies to this topic

#1 danielffem

danielffem

    Novato no fórum

  • Usuários
  • 24 posts
  • Sexo:Masculino
  • Localidade:São Bernardo do Campo

Posted 01/08/2010, 23:49

Boa Tarde..

Realizei esses código com a funcionalidade de um Quiz em php com banco de dados mysql. Alguém pode me ajudar dizendo como posso armazenar as resposta de cada questão no banco mysql e também como posso saber qual a questão que mais erraram. Se caso precisar mudar o codigo, tudo bem.

desde já agradeço pela ajuda.

Segue os codigos abaixo:

Quiz.php

<html>
<head>
<title>Pagamento Informado e Comprovado</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p> <form method="post" action="confere.php">

1) Qual é o melhor amigo do Bob Esponja e Patrick?<br>

<input type="radio" name="1" value="correta">Lula Molusco<br>
<input type="radio" name="1" value="er">Plancton<br>
<input type="radio" value="er" name="1">Sandy<br>
<input type="radio" value="er" name="1">teste<br><br>

2) Onde o Bob Esponja trabalha?<br><br>
<input type="radio" name="2" value="er">Mercado da Baganha<br>
<input type="radio" name="2" value="er">Balde de lixo<br>
<input type="radio" name="2" value="correta">Siri Cascudo<br>
<input type="radio" value="er" name="2">teste<br><br>

3) Qual é a atividade preferida de Bob Esponja e Patrick?<br><br>
<input type="radio" name="3" value="correta">Caçar água-viva<br>
<input value="er" type="radio" name="3">Fazer bolhas de sabão<br>
<input type="radio" value="er" name="3">Comer hambúrgues de siri<br>
<input type="radio" value="er" name="3">teste<br><br>

4) Como chama-se o animal de estimaçao de Bob Esponja?<br><br>
<input type="radio" name="4" value="correta">Gary<br>
<input name="4" value="er" type="radio">Lary<br>
<input name="4" value="er" type="radio">Jerry<br>
<input type="radio" value="er" name="4">Teste<br><br>

5) Quem sempre tenta roubar a formula do hambúrguer de siri?<br><br>
<input type="radio" name="5" value="er">Lula Molusco <br>
<input type="radio" value="correta"> Plancton<br>
<input name="5" type="radio" value="er"> Don <br>
<input type="radio" value="er" name="5">teste<br><br>

6)Bob Esponja sempre tenta passar no exame de...?
<input type="radio" name="6" value="er">Culinária<br>
<input name="6" value="er" type="radio">Bolhas de sabão<br>
<input type="radio" name="6" value="correta">Pilotagem<br>
<input type="radio" value="er" name="6">teste<br><br>

7) Qual instrumento Lula Molusco toca?<br><br>
<input type="radio" name="7" value="correta">Clarineta<br>
<input name="7" value="er" type="radio">Violão<br>
<input type="radio" name="7" value="er">Violino<br>
<input type="radio" value="er" name="7">teste<br><br>

8) Quem é o principal rival do Lula Molusco?<br><br>
<input type="radio" name="8" value="er">Bob Esponja<br>
<input name="8" value="correta" type="radio">Squilliam Fancyson<br>
<input type="radio" value="er" name="8">Lary<br>
<input type="radio" value="er" name="8">teste<br><br>

9) Qual o nome do dono do restaurante Siri Cascudo?<br><br>
<input type="radio" name="9" value="correta">Seu Sirigueijo<br>
<input name="9" value="er" type="radio">Lula Molusco<br>
<input name="9" value="er" type="radio">Holandês Voador<br>
<input type="radio" value="er" name="9">teste<br><br>

10) Qual a habilidade mais reconhecida do Bob Esponja?<br><br>
<input type="radio" name="10" value="er">Caçar água-viva<br>
<input name="10" value="er" type="radio">Lutar Karate<br>
<input name="10" value="correta" type="radio">Fazer hambúrgues de siri<br>
<input type="radio" value="er" name="10">teste<br><br>

11) Quem vive numa casa embaico d'água como se fosse um "aquario"?<br><br>
<input type="radio" name="11" value="er">Bob Esponja<br>
<input name="11" value="er" type="radio">Squilliam Fancyson<br>
<input name="11" value="correta" type="radio">Sandy<br>
<input type="radio" value="er" name="11">teste<br><br>

12) Qual personagem mora embaixo de um pedra?<br><br>
<input type="radio" name="12" value="correta">Patrick<br>
<input name="12" value="er" type="radio">Lula Molusco<br>
<input name="12" type="radio" value="er">Seu Sirigueijo<br>
<input type="radio" value="er" name="12">teste<br><br>

13) Qual o nome da filha de Seu Sirigueijo?<br><br>
<input type="radio" name="13" value="er">Ruby<br>
<input name="13" value="correta" type="radio">Perola<br>
<input name="13" type="radio" value="er">Patricia<br>
<input type="radio" value="er" name="13">teste<br><br>

14) De quem Seu Sirigueijo gosta?<br><br>
<input type="radio" name="14" value="er">Sandy<br>
<input name="14" value="correta" type="radio">Senhora Puff<br>
<input name="14" type="radio" value="er">Ninguem<br>
<input type="radio" value="er" name="14">teste<br><br>

15) Quem é o parceiro do Homem-Sereia?<br><br>
<input type="radio" name="15">Mexilhão<br>
<input name="15" value="correta" type="radio">Mexilhãozinho<br>
<input name="15" type="radio" value="er">Super Mexilhão<br>
<input type="radio" value="er" name="15">teste<br><br>

16) Quem é a noiva de Plancton?<br><br>
<input type="radio" name="16">Roberta<br>
<input name="16" value="er" type="radio">Renata<br>
<input name="16" value="correta" type="radio">Karen<br>
<input type="radio" value="er" name="16">teste<br><br>

17) Oque Patty é?<br><br>
<input type="radio" name="17" value="correta">Pirata<br>
<input name="17" value="er" type="radio">Marinheiro<br>
<input name="17" type="radio" value="er">Tripulante<br>
<input type="radio" value="er" name="17">teste<br><br>
<input name="Checar" type="submit">
</form>
<br>
</p>
</body>
</html>

confere.php

<html>
<head>
<title>Resultados</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?
include("seguranca.php"); // Inclui o arquivo com o sistema de segurança
protegePagina(); // Chama a função que protege a página
?>


<?php

$resposta_01 = $_POST["1"];
$resposta_02 = $_POST["2"];
$resposta_03 = $_POST["3"];
$resposta_04 = $_POST["4"];
$resposta_05 = $_POST["5"];
$resposta_06 = $_POST["6"];
$resposta_07 = $_POST["7"];
$resposta_08 = $_POST["8"];
$resposta_09 = $_POST["9"];
$resposta_10 = $_POST["10"];
$resposta_11 = $_POST["11"];
$resposta_12 = $_POST["12"];
$resposta_13 = $_POST["13"];
$resposta_14 = $_POST["14"];
$resposta_15 = $_POST["15"];
$resposta_16 = $_POST["16"];
$resposta_17 = $_POST["17"];

if ($resposta_01 != "correta")
{
echo "Você errou a questão 1!<br>";
}
elseif ($resposta_01 == "correta")
{
$resp_01 = 1;
}



elseif ($resposta_02 != "correta")
{
echo "Você errou a questão 2!<br>";
}
elseif ($resposta_02 == "correta")
{
$resp_02 = 1;
}


elseif ($resposta_03 != "correta")
{
echo "Você errou a questão 3!<br>";
}
elseif ($resposta_03 == "correta")
{
$resp_03 = 1;
}


elseif ($resposta_04 != "correta")
{
echo "Você errou a questão 4!<br>";
}
elseif ($resposta_04 == "correta")
{
$resp_04 = 1;
}


elseif ($resposta_05 != "correta")
{
echo "Você errou a questão 5!<br>";
}
elseif ($resposta_05 == "correta")
{
$resp_05 = 1;
}


elseif ($resposta_06 != "correta")
{
echo "Você errou a questão 6!<br>";
}
elseif ($resposta_06 == "correta")
{
$resp_06 = 1;
}


elseif ($resposta_07 != "correta")
{
echo "Você errou a questão 7!<br>";
}
elseif ($resposta_07 == "correta")
{
$resp_07 = 1;
}


elseif ($resposta_08 != "correta")
{
echo "Você errou a questão 8!<br>";
}
elseif ($resposta_08 == "correta")
{
$resp_08 = 1;
}


elseif ($resposta_09 != "correta")
{
echo "Você errou a questão 9!<br>";
}
elseif ($resposta_09 == "correta")
{
$resp_09 = 1;
}


elseif ($resposta_10 != "correta")
{
echo "Você errou a questão 10!<br>";
}
elseif ($resposta_10 == "correta")
{
$resp_10 = 1;
}


elseif ($resposta_11 != "correta")
{
echo "Você errou a questão 11!<br>";
}
elseif ($resposta_11 == "correta")
{
$resp_11 = 1;
}


elseif ($resposta_12 != "correta")
{
echo "Você errou a questão 12!<br>";
}
elseif ($resposta_12 == "correta")
{
$resp_12 = 1;
}


elseif ($resposta_13 != "correta")
{
echo "Você errou a questão 13!<br>";
}
elseif ($resposta_13 == "correta")
{
$resp_13 = 1;
}


elseif ($resposta_14 != "correta")
{
echo "Você errou a questão 14!<br>";
}
elseif ($resposta_14 == "correta")
{
$resp_14 = 1;
}


elseif ($resposta_15 != "correta")
{
echo "Você errou a questão 15!<br>";
}
elseif ($resposta_15 == "correta")
{
$resp_15 = 1;
}


elseif ($resposta_16 != "correta")
{
echo "Você errou a questão 16!<br>";
}
elseif ($resposta_16 == "correta")
{
$resp_16 = 1;
}


elseif ($resposta_17 != "correta")
{
echo "Você errou a questão 17!<br>";
}
elseif ($resposta_17 == "correta")
{
$resp_17 = 1;
}
?>


</body>
</html

#2 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 19/09/2017, 03:32

Buy Levothyroxine 25mcg From India cialis online Viagra Bestellen Afhalen
Order Diflucan Online No Prescription
Cialis Online Rezeptfrei Bestellen online pharmacy Kamagra Online Bestellen Legal

#3 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 26/09/2017, 15:12

Generic Propecia Cheap cheap cialis Stendra Secure Ordering Overseas Cheapeast Cialis Tabletas Recubiertas
Zithromax Antybiotyk Amoxicillin Side Effects And Toddler buy cialis Mrsa Cephalexin Where Can I Buy Cyotec In The Us Amoxicillin .25g Dosage Information
Kamagra 100mg Tablets Diovanforsale cialis price Where To Order Progesterone Mastercard Accepted

#4 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 08/10/2017, 20:51

Viagra 100mg Precio Pastillas Para Ereccion Cheap Viagra In Australia online pharmacy Supradyn where can i buy accutane yahoo Purchase Bupropian Online

#5 xapedlok

xapedlok

    Ativo

  • Usuários
  • 392 posts
  • Sexo:Feminino
  • Localidade:Bochum

Posted 09/10/2017, 05:20

Discounts! best usa products

progect12.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
2016 Trekking Team Cycling Jersey MTB Cycling Clothes Quick-Dry Ropa Ciclismo Bike Sets Cycling Clothing Cycle Sportswesr ( 12.68 $)
Xiaomi Air 12 Laptop-730.08 $
Stylish women's round neck floral print sleeveless blouse ( 12.31 $)
Ski snowboard black handbags cross country skiing pole bag Mountain skiing snow board protection backpack ( 3.50 $)
Addam Velarion Game of Thrones
520PCS 26 Types DIY Common Resistor Set ( $3.70 )
Opal Stone Stud Earrings Christmas Party 2016 Brand New Elegant Crystal Earrings For Women Trendy Gold Plated Women Earrings ( 2.16 $)
Protaranil avtobus s passazhirami (Video)
Redentore 1 - Pink and Green Murano Glass Drops Silver Leaf Bracelet ( 55.00 $)
Iwish hair thick 4 bundles malaysian body wave malaysian virgin hair body wave wavy human hair ali moda malaysian virgin hair ( 72.70 $)
Cube iWork 10 Flagship Tablet PC Ultrabook-187.26 $
Wavy line print long sleeve round neck color block plus size t-shirt ( 9.89 $)
Zvyozdnie vrata SG-1. Sezon 7
5 in 1 Outdoor Survival Paracord Bracelet-1.96 $
Hot sales women ladies waterproof elegant color lipstick matte smooth lip stick lipgloss long lasting sweet ( 0.56 $)


41.jpg

#6 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 09/10/2017, 22:48

Cephalexin Replacement For Dogs Dauerstander Ohne Viagra viagra online Precio Del Viagra En Farmacias Discount Purchase Fluoxetine No Prior Script

#7 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 22/10/2017, 23:26

Pramil 50mg generic isotretinoin acne find real visa cod only Buy Cheap Kamagra No Prescription brandlevitra on line Para Q Es El Medicamento Cephalexin Kjop Lasix
Viagra Junge Leute isotretinoin where can i buy viagra vs cialis vs levitra reviews Infections Treated By Keflex Cheapest Accutane 40 Mg

#8 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 23/10/2017, 12:07

Preise Fur Propecia Cephalexin Wikipedia Retin A No Prescription viagra Viagra Ai Giovani
Cheap Acyclovir eva pills levitra Dutasteride Us Secure Ordering Fedex Shipping Amex Vardenafil Cheap Comprar Cialis Generico En Barcelona
Prices Of Viagra Can I Crush Amoxicillin online pharmacy Amoxicillin Medical

#9 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 27/10/2017, 19:49

Viagra Prescription In Canada levitra vs viagra vs cialis Cialis Generique Serieux Duloxetine 60 Mg No Prescription
Cialis Somministrazione Cialis 50 viagra When Does Amoxicillin Expire Cuanto Cuesta Cialis En Farmacia
Zithromax 3 Day Vs 5 Day Prix Du Kamagra cialis price Propecia Gleicher Wirkstoff Cephalexin And Marijuana Viagra Ordering From India

#10 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 29/10/2017, 14:10

Discount Pharmacy In Us Online buy viagra Cialis Tous Les Jours
On Line Sales Of Viagra Best And Quickest Viagra Online Pharmatie Canadienne Viagra Generique generic levitra Levitra Durata Effetto

#11 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 04/11/2017, 23:19

Best Generic Viagra Review viagra online pharmacy Remove Pink Amoxicillin Stain From Clothes
Propecia Generic 15mg buy viagra Buy Avodart Online Canada accutane online australia Clomid Date Ovulation
Propecia Dosage Sperm Cialis Daily Test Viara Generic Pay With American Express viagra Viagra For Sale Cheap Can Dogs Take People Amoxicillin Buy Olistat
Cialis Y Eyaculacion Viagra Flussig Le Viagra Achat generic viagra Amoxicillin Urine Diflucan And Canadian Pharmacy

#12 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 07/11/2017, 00:02

Cephalexin To Treat Spondylitis viagra online pharmacy Propecia Productividad

#13 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 30/11/2017, 13:08

Maximum Pediatric Amoxil Dose online pharmacy Dosage For Keflex Pulvules 500 Mg Levitra Fur Junge Manner
Amoxicilina Next Day With Free Shipping online pharmacy Amoxicillin Coughing Les Effets Du Viagra Sur L'Homme

#14 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 10/02/2023, 05:01

Skull and scalp lesions were present in 19 and 16 of cases, respectively non prescription cialis online pharmacy
I finished my Femara doses and have a follicle check in 4 days lasix price As soon as he entered the sea, he directly collided with an extremely hard object
Tamoxifen Acdima indications clomiphene citrate Example 77 Synthesis of 6 4 3 chloro 2 methoxyphenyl amino 2 methyl 3 oxo 2, 3 dihydro 1H pyrazolo 3, 4 b pyridin 6 yl amino picolinonitrile, I 99
Similarly, the fimB fimA srtC2 gene cluster encodes the type 2 fimbriae composed of a shaft protein, FimA, and a tip protein, FimB doxycycline long term side effects 1, or both channels




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq