contact.php
... html form ...
$('#submit').click(function(){
$.post("mail.php", $("#contact").serialize(), function(response) {
$('#success').html(response);
});
return false;
});
mail.php は (メールを送信するための) 別のファイルであり、すべてがこの配置で機能します。
しかし、contact.php を index.php にロードする必要があります。
$('#divR').load('chapters/contact.php');
対応するjs行は
$.post("chapters/mail.php", $("#contact").serialize(), function(response) {...
この場合、フォームのresponse
送信元mail.php
は受信されますが、配列は空です。つまり、フォームは!?POST
にデータを送信しません。mail.php