메일러를위한 PHP 코드와 함께 어제 큰 도움을 받았고 체크 표시가 선택된 옵션을 메일러가 알고 있도록 코드를 포함하는 방법을 알아야한다는 것을 잊어 버렸습니다. 예 또는 아니오 옵션 만 사용할 수있는 간단한 '메일 목록 가입'옵션입니다.PHP emailer가 체크 박스에 대한 답을 제공합니다
<?php
$state = 0;
// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
// if verification code was correct send the message and show this page
mail("[email protected]", 'Online Form: '.$subject, "\n".$message."
\n\n".$name."\n\n".$lastname."\n\n".$from."\n\n".$_SERVER['REMOTE_ADDR']." \n\n".'mailinglist: '.$mailinglist, "From: $from");
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
$state = 2;
} else if(isset($message) and $message!=""){
// if verification code was incorrect then return to contact page and show error
$state = 1;
}
if ($state == 0) { ?>
내가 그것을 알아낼 수 있는지 확인하기 위해이 비트와 함께 연주하지만 앞서 자신의 도착하기 전에 나는 멈출 것이라고 생각 시도
완전히 엉망 그것을 :
다음과 같이코드입니다 당신은 이메일 사용자가 maling 목록에 대해 예를 선택 여부를 말하고 싶은 경우
<td align="left"><input type=checkbox name="mailinglist" id="mailinglist" value="1<?php echo $_GET['mailinglist'];?>">Yes<input type=checkbox name="mailinglist" id="mailinglist" value="2<?php echo $_GET['mailinglist'];?>">No<font face="Verdana" size="3" color="#666666"></font><br> </td></tr><tr valign="top" align="right"> <td nowrap><font face="Verdana" size="3" color="#666666">comments (<span class="R">*</span>)</font></td>
앞의 질문은 무엇을위한 방법 POST를 사용하는 가정을? – Tarik
@Braveyard, 어제의 이전 질문이 리디렉션 문제를 수정하고있었습니다. 새로운 질문은 이메일을 보내도록하는 방법입니다. mailinglist : 확인 된 옵션에 따라 예 또는 아니요. – Leah
'md5 ($ verif_box). 'a4xn'은 검증 방법의 농담입니다. 이런 식으로하지 마십시오. – sanmai