0
1.php통과 변수
include'form.html'
form.html
<form action="email.php" method="post">
<input type="text" id="name" value="name" />
</form>
오류
<?php
$name = $_POST['name'];
$email_message = "Name: $name ";
$sent = mail($email_to, $email_subject, $email_message);
if($sent) {
echo "success=yes";
} else {
echo "success=no";
}
include('success.html');
?>
email.php로 :
Notice: Undefined index: name in C:\wamp\www\a\action.php on line 3
또한 form.html에서 전역 변수를 만들려고 시도했지만 작동하지 않습니다.
감사합니다. 빠른 답변을드립니다. –
감사합니다. vinay가 작동합니다. –