Allora, cerchero' di essere breve( ma e' difficile visto la situazione)
Se inserisco questo codice :
Codice PHP:
<?php
//'''''''''' inserire il nome del dominio
$DOMAIN='xxxxxxx';
//'''''''''' inserire il nome della lista o delle liste
$LISTS[]='xxxxxx';
//''''''''fine configurazione
$response_template='
<center>
<div align="center">
<table border="0" cellspacing="1" cellpadding="2" width="570">
<tr>
<td align="center">
%%ACTION%% %%LIST%%@%%DOMAIN%%
</td>
</tr>
<tr>
<td class="response">
Riceverai una mail a breve su "%%ADDRESS%%". Quello che devi fare è usare la funzione "Rispondi" del tuo client di posta
ed inviare tale risposta: non è necessario scrivere nulla.
</td>
</tr>
</table>
</div>
</center>
';
?>
<table border="0" cellspacing="0" cellpadding="0" width="570">
<form method="post">
<tr>
<td align="center">Indirizzo email</td>
<td align="center">Azione</td>
<td align="left"></td>
</tr>
<tr>
<td align="center"><input type="text" value="<?php echo $_GET['a']; ?>" name="addy" size="30"></td>
<td align="center"><input type="hidden" name="list" value="mailing-list"><select name="action"><option value="subscribe">Iscriviti<option value="unsubscribe">Rimuovi iscrizione</select></td>
<td align="left"><input type="submit" value="GO!"></td>
</tr>
</form>
</table>
<?php
switch ( $_POST['action'] ) {
case 'subscribe':
if ( !empty($_POST['addy']) ) {
if ( mail($list.'-subscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'', '') ) {
show_tpl($response_template, 'ISCRITTO A: ', $list, $DOMAIN, $_POST['addy']);
}
}
break;
case 'unsubscribe':
if ( !empty($_POST['addy']) ) {
if ( mail($list.'-unsubscribe-'.str_replace('@', '=', $_POST['addy']).'@'.$DOMAIN ,'', '') ) {
show_tpl($response_template, 'RIMOSSO DA: ', $list, $DOMAIN, $_POST['addy']);
}
}
break;
}
function show_tpl($tpl, $action, $list, $domain, $address) {
$tpl=str_replace('%%ACTION%%', $action, $tpl);
$tpl=str_replace('%%LIST%%', $list, $tpl);
$tpl=str_replace('%%DOMAIN%%', $domain, $tpl);
$tpl=str_replace('%%ADDRESS%%', $address, $tpl);
echo $tpl;
}
?>
in una pagina con un include , tipo questa (e' un pezzo del mio sito)
il codice non funziona:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="44" valign="top" ><?php include ("colonna.php"); ?></td>
<td width="640">QUI INSERISCO IL CODICE PHP CHE CON INCLUDE NON FUNZIONA
</td>
<td width="67"></td>
</tr>
</table>
se invece tolgo l'include
Codice PHP:
<?php include ("colonna.php"); ?>
il codice funziona perfettamente.....
any advice?
qualche consiglio?
vi serve vedere anche l'include?
ciao