Files
unisa_tsw_2014_2015/php_7.php

100 lines
2.0 KiB
PHP

<?php
require_once ('functions.php');
include('header.html');
///////////////////////////
echo<<<_css
<style>
h1 {
margin: 1.5em;
}
table {
border: 1px solid black;
}
td.upper {
border-bottom:1px solid black;
}
td.lower {
border-top:1px solid black;
}
</style>
_css;
echo "\n";
///////////////////////////
if ($_GET == null){
echo<<<_html
<table> <tr> <td class="upper"> <h1> Scelta Utente </h1></td></tr>
<tr> <td class="mid">
<form id="form" method="get" >
Nome:<input type="text" name="nome" required autofocus/> <br>
Password:<input type="password" name="password" required/> <br><br>
Quali argomenti vorresti approfondire?<br>
<input type="checkbox" name="op1" value="Informazioni su HTML"/> Informazioni su HTML<br>
<input type="checkbox" name="op2" value="Immagini"/> Immagini<br>
<input type="checkbox" name="op3" value="Collegamenti e url"/> Collegamenti e url<br>
<input type="checkbox" name="op4" value="Oggetti multimediali"/> Oggetti multimediali<br>
<input type="checkbox" name="op5" value="XHTML versione 1.0"/> XHTML versione 1.0<br>
</form>
</td></tr>
<tr> <td class="lower">
<input type="submit" value="Invia!" form="form"/> <input type="reset" value="Cancella tutto!" form="form"/>
</td></tr>
</table>
_html;
}else {
echo "<table>";
echo "<tr><td colspan=\"2\"> Nome " . $_GET['nome'] . " Password : " . $_GET['password'] . "</td></tr>\n";
if (array_key_exists("op1", $_GET)) { echo "<tr><td> Approfondimento </td><td>" . $_GET['op1'] . "</td></tr>\n";}
if (array_key_exists("op2", $_GET)) { echo "<tr><td> Approfondimento </td><td>" . $_GET['op2'] . "</td></tr>\n";}
if (array_key_exists("op3", $_GET)) { echo "<tr><td> Approfondimento </td><td>" . $_GET['op3'] . "</td></tr>\n";}
if (array_key_exists("op4", $_GET)) { echo "<tr><td> Approfondimento </td><td>" . $_GET['op4'] . "</td></tr>\n";}
if (array_key_exists("op5", $_GET)) { echo "<tr><td> Approfondimento </td><td>" . $_GET['op5'] . "</td></tr>\n";}
echo "</table>";
}
include ('footer.html');
?>