1.php
include'form.html'
form.html
<form action="email.php" method="post">
<input type="text" id="name" value="name" />
</form>
email.php
<?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');
?>
エラー:
Notice: Undefined index: name in C:\wamp\www\a\action.php on line 3
また、form.htmlでグローバル変数を作成しようとしましたが、機能しませんでした