esercizi su form, php
This commit is contained in:
57
php6.php
Normal file
57
php6.php
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
<?php
|
||||
|
||||
require_once ('functions.php');
|
||||
include('header.html');
|
||||
|
||||
///////////////////////////
|
||||
echo<<<_css
|
||||
|
||||
<style>
|
||||
|
||||
select {
|
||||
width:100px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
_css;
|
||||
echo "\n";
|
||||
///////////////////////////
|
||||
|
||||
|
||||
|
||||
if (!isset($_GET['attributes']) ){
|
||||
|
||||
echo <<<_html
|
||||
<form method="GET">
|
||||
Select your personality attributes:<br />
|
||||
<input type="checkbox" name="attributes[]" value="perky" /> Perky<br />
|
||||
<input type="checkbox" name="attributes[]" value="morose" /> Morose<br />
|
||||
<input type="checkbox" name="attributes[]" value="thinking" /> Thinking<br />
|
||||
<input type="checkbox" name="attributes[]" value="feeling" /> Feeling<br />
|
||||
<input type="checkbox" name="attributes[]" value="thrifty" />Spend-thrift<br />
|
||||
<input type="checkbox" name="attributes[]" value="shopper" /> Shopper<br />
|
||||
<br />
|
||||
<input type="submit" name="s" value="Record my personality!" />
|
||||
</form>
|
||||
|
||||
_html;
|
||||
|
||||
}else{
|
||||
|
||||
print_r($_GET);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
include ('footer.html');
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user