manage your attachments

[php]
if (!isset($_REQUEST[‘delattach’])) {
echo “

you may transcend your attachments at any time, releasing them from your collection.

“;
$attachcookie = $_COOKIE[‘attach’];
$attacharray = explode(“, “,$attachcookie);
$i = 0;
echo ‘

‘;
while ($i < count($attacharray)) { echo ' ‘.$attacharray[$i].’
‘;
$i++;
} // end this while loop print attachments
echo ‘

or return to #zen

‘;
echo ‘

‘;
} else { // if the button hasn’t been clicked
$attach = $_COOKIE[‘attach’]; // move the cookie to $attach
$attacharray = explode(“,”,$attach); // recreate attach array
$i = 0;
while ($i < count($_REQUEST['delattach'])) { $delchoice = $_REQUEST['delattach'][$i]; $removalstring = $attacharray[$delchoice]; if ($removalstring != "nothing") { $attach = str_replace($removalstring, "", $attach); $attach = str_replace(",,", ",", $attach); } $i++; } $attach = rtrim($attach, ","); setcookie("attach", $attach, $cooltime, "/", ".koanoftheday.com"); [/php] you have transcended those attachments.

your current attachments are as follows: [php]echo $attach;[/php].

would you like to transcend more or return to #zen?
[php]} [/php]