<?
if (strlen($POST['name']) > 0) {
$POST['name'] = striplashes($POST['name']);
} else {
$POST['name'] = NULL;
echo '<p><b>You forgot to enter your name!</b></p>';
}
if (isset($POST['interests'])) {
$POST['ints'] = NULL;
foreach ($POST['interests'] as $POST['key'] => $POST['value']){
$POST['ints'] .= "$value, ";
}
$POST['ints'] = substr($POST['ints'], 0, -2);
$POST['interests'] = TRUE;
} else
$POST['interests'] = NULL;
echo '<p><b>You forgot to enter your interests!</b></p>';
if ($POST['name'] && $POST['interests']) {
echo "Thank you, <b>[$POST[name]}</b>. You entered your interests as: <br /><tt>$POST[ints]</tt></p>";
}
?>