-2
매우 간단한 가입 양식을 작성 중입니다. 사용자가 이름과 이메일을 입력 한 다음 가입 버튼을 누릅니다.PHP 메일()을 사용하여 AngularJS로 메일 보내기
이것이 작동하지 않는 이유를 모르겠습니다. 여기에 누락 된 것이 있습니까?
<form class="form-signin" role="form" name='subscriptionForm' action='/' method='post'>
<h4 class="form-signin-heading">Get new articles via email</h4>
<input type="text" class="form-control" name="name" placeholder="Name" required autofocus>
<br/>
<input type="text" class="form-control" name="email" placeholder="Email address" required autofocus>
<br/>
<button class="btn btn-lg btn-primary btn-block" data-toggle="dropdown" type="submit">Subscribe Me!</button>
<br/><br/>
<?php
if (isset($_REQUEST['name']) && isset($_REQUEST['email']))
//if email is filled out, send email
{
$to = "[email protected]";
$subject = "Thngs Of That Nature | Article Subscription";
$name = $_POST['name'] ;
$message = 'Hello there, I would like to subscribe to Thngs Of That Nature!' ;
$from = $_REQUEST['email'] ;
$headers = $name .'('. $from .')';
mail($to, $subject, $message, $headers);
echo "<div class='fb'>Awe! <b>" .$name ." Stay sharP!";
} else {
echo "NOPE!";
};
?>
</form>
질문이 누락되었습니다 –
헤더를 삽입하여 수천 개의 스팸 전자 메일을 보내도록 응용 프로그램을 해킹 할 수 있다는 사실을 제외하고 는요? – h2ooooooo
. 있습니다. 그만큼. 문제? –