Salve ragazzi ho trovato uno script qui nel sito per l'invio email
L'email viene inviata in questo modo:
Codice PHP:
$message="$msg_date:".spaces($msg_indent-strlen($msg_date)).date("d M Y, H:i", time());
if ($_REQUEST['evento']) $message.="\n$msg_evento:".spaces($msg_indent-strlen($msg_evento)).$_REQUEST['evento'];
if ($_REQUEST['name']) $message.="\n$msg_name:".spaces($msg_indent-strlen($msg_name)).$_REQUEST['name'];
if ($_REQUEST['surname']) $message.="\n$msg_surname:".spaces($msg_indent-strlen($msg_surname)).$_REQUEST['surname'];
if ($_REQUEST['residente']) $message.="\n$msg_residente:".spaces($msg_indent-strlen($msg_residente)).$_REQUEST['residente'];
if ($_REQUEST['birthday']) $message.="\n$msg_birthday:".spaces($msg_indent-strlen($msg_birthday)).$_REQUEST['birthday'];
if ($_REQUEST['eventday']) $message.="\n$msg_eventday:".spaces($msg_indent-strlen($msg_eventday)).$_REQUEST['eventday'];
if ($_REQUEST['invitati']) $message.="\n$msg_invitati:".spaces($msg_indent-strlen($msg_invitati)).$_REQUEST['invitati'];
if ($_REQUEST['orario']) $message.="\n$msg_orario:".spaces($msg_indent-strlen($msg_orario)).$_REQUEST['orario'];
if ($_REQUEST['luogo']) $message.="\n$msg_luogo:".spaces($msg_indent-strlen($msg_luogo)).$_REQUEST['luogo'];
if ($_REQUEST['phone']) $message.="\n$txt_phone:".spaces($msg_indent-strlen($txt_phone)).$_REQUEST['phone'];
$message.="\n$txt_email:".spaces($msg_indent-strlen($txt_email)).$_REQUEST['email'];
$message.="\n\n".spaces(strlen("$msg_answerby ".$_REQUEST['kontakt'])+1, "=");
$message.="\n$msg_answerby ".$_REQUEST['kontakt']."!\n";
$message.=spaces(strlen("$msg_answerby ".$_REQUEST['kontakt'])+1, "=");
$message.="\n\n$msg_request:\n\n".$_REQUEST['message'];
mail($target_address, $email_subject, $message, "From: ".$_REQUEST['email']);
echo $txt_thankyou;
}else if ($error!==false) $error=str_replace("{errors}", $error, $txt_error);
}
if ($error!==false){
Ora dovrei aggiungere un paio di checkbox
Prova: Prova1
Prova2
Prova3
Prova4
Prova5
Con la possibilità di selezione più di uno anche tutti(ovvio se no avrei messo un button radio^^)
In base a quel codice come faccio a inserire il checkbox nel codice php esempio:
Codice PHP:
if ($_REQUEST['check']) $message.="\n$msg_check:".spaces($msg_indent-strlen($msg_check)).$_REQUEST[check'];
E nel codice html???
Grazie anticipatamente!