Ciao a tutti!
il mio problema è questo che voglio usare la newsletter di aruba inserendo nel codice index.php quello di aruba da me modificato ( essenzialmente è solo un form con un modulo )
vi posto il codice
<?php
$imposta = ini_set("sendmail_from", "postmaster@adep.rc.it");
if (!$imposta) { print "Non posso impostare sendmail_from!
\n"; }
//fine modifica aprile 2008
//'''''''''' inserire il nome del dominio
$DOMAIN=miodominio.it';
$LISTS[]='news';
?>
<table border="0" cellspacing="0" cellpadding="0">
<form method="post">
<tr>
<td>Iscrizviti alla nostra newsletter</td>
</tr>
<tr>
<td>Inserisci il tuo indirizzo email</td>
</tr>
<tr>
<td>
<input type="text" value="<?php echo $_GET['a']; ?>" name="addy" size="20">
<input type=hidden name="list" value="notizie-adep">
<input type=hidden name="action" value="subscribe">
</td>
</tr>
<tr>
<td align="left"><input type="submit" value="OK!"></td>
</tr>
<tr>
<?php
$response_template='
%%ACTION%%
<td class="response">
</td>
';
?>
</tr>
<tr>
</form>
</table>
<?php
function provatpl($tpl, $action, $list, $domain, $address) {
$tpl=str_replace('%%ACTION%%', $action, $tpl);
echo $tpl;
}
switch ( $_POST['action'] ) {
case 'subscribe':
if ( !empty($_POST['addy']) ) {
if ( mail($list.'-subscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'iscrizione', 'iscrizione') ) {
provatpl(' ', 'ISCRITTO!!!', 'news', $DOMAIN, $_POST['addy']);
}
}
break;
case 'unsubscribe':
if ( !empty($_POST['addy']) ) {
if ( mail($list.'-unsubscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'annulla iscrizione', 'annulla') ) {
show_tpl($response_template, 'RIMOSSO DA: ', $list, $DOMAIN, $_POST['addy']);
}
}
break;
}
mi potete dire perchè??? grazie
?>
se il codice lo metto in una pag a parte funziona nella index no