<html>
<head><title>Personality</title></head>
<body>
  
<form action="<?chp CHP_PRINTF("%s", CHP_SERVER_SELF); ?>" method="GET">
Select your personality attributes:<br />
Perky <input type="checkbox" name="attributes[]" value="perky" /><br />
Morose <input type="checkbox" name="attributes[]" value="morose" /><br />
Thinking <input type="checkbox" name="attributes[]" value="feeling" /><br />
Feeling <input type="checkbox" name="attributes[]" value="feeling" /><br />
Spend-thrift <input type="checkbox" name="attributes[]" value="thrifty" /><br />
Shopper <input type="checkbox" name="attributes[]" value="thrifty" /><br />
<br />
<input type="submit" name="s" value="Record my personality!" />
</form>
  
<?chp
	if (CHP_GET_VARS("s") != NULL) {
		int  i;
		char *str;

		CHP_PRINTF("You have a ");
		for (i=0; i<100; i++) {
			str = CHP_GET_ARRAYS("attributes[]",i);
			if (!str) break;
			CHP_PRINTF("%s ", str);
		}
		CHP_PRINTF("personality.");
	}
?>
  
</body>
</html>
