0
PHPエコーメッセージをフェードアウトしたい。ここに私のPHPコードは次のとおりです。PHPエコーメッセージをフェードアウト
フォームデータが送信されます<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$subject = $_POST['subject'];
$to = '[email protected]';
if (filter_var($email, FILTER_VALIDATE_EMAIL)) { // this line checks that we have a valid email address
$mailSubject = "Contact request from " .$name;
$txt = "name : ".$name.".\n\nSubject : ".$subject.".\n\nMail id : ".$email."\n\nMessage : ".$message;
$headers = "From: ".$email ;
mail($to,$mailSubject,$txt,$headers);
$data = array();
$data['status'] = 'success';
//echo json_encode($data);
echo "<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'></script>";
echo "<p id='#text'>Your email was sent! One of our team members would contact you shortly!</p>"; // success message
echo "<script type='text/javascript'>";
echo "$(function(){";
echo "$('#text').fadeOut(5000);";
echo "});";
echo "</script>";
}
else{
echo "Mail was not sent, make sure that all fields are filled in";
}
?>
、首尾よく、私はYour email was sent! One of our team members would contact you shortly!
としての応答を取得します。しかし、期待どおりにフェードアウトしません。どのように私はそれをフェードアウトさせることができますか?
ああ、がらくたでなければなりません...それを見ませんでした:Dとにかく、おかげでトンを:) –