Php: Realizza form per quiz

In questo tutorial potrete vedere come Php può essere utilizzato per interagire con gli utenti attraverso i vari form. Quiz on line sul vostro sito? Ecco il codice della pagina html:

<form action="quiz.php" method="get">
In quale squadra di calcio italiana ha giocato Maradona?
 
 Juve
 
 Milan
 
 Napoli
 
 
</form>

Ed ecco il codice in Php

html
head&amp;/head
body
?php
if ($_GET['risposta'] == "Napoli") echo "Risposta esatta!";
if ($_GET['risposta'] != "Napoli") echo "Risposta sbagliata! Maradona giocò nel Napoli";
?
/body
/html

Articoli simili

  1. rossi
    Posted marzo 1, 2010 at 5:39 pm

    non si capisce na mazza….

Lascia un commento

Your email is never published nor shared. Required fields are marked *

*
*

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a