On Fri, August 4, 2006 7:14 am, David Ellsworth wrote:
> I was wondering how simple it would be to set up a script to provide a
> subscribe/unsubscribe form for a list serve. The form would send an
> email to
> the subscribe address or unsubscribe address as selected.
It's pretty simple:
<?php
if (isset($_REQUEST['email'])){
$success = mail($_REQUEST['action'], 'un/subscribe',
'un/subscribe', "From: $_REQUEST[email]\r\nReply-to:
$_REQUEST[email]");
if ($success) echo "Status Change Sent";
else echo "Unable to send Status Change";
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<input type="radio" name="action" value="[EMAIL PROTECTED]">
Subscribe
<input type="radio" name="action" value="[EMAIL PROTECTED]">
Unsubscribe<br />
<input name="email">
</form>
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php