通过ajax& amp;确认表格时显示消息成功jQuery的

时间:2015-06-22 05:59:29

标签: php forms message show

当用户为简报撰写电子邮件时,我想向他们展示一条suuccess消息

newsletter.php
<?php
$templates="templates/";
require_once 'includes/init.inc.php';
//require_once 'includes/classes/email.php';

if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (($result=mail::add_newsletter($_REQUEST['email'])) >0) {
            Util::Redirect("index.php");
  } else {
      echo 'you register befor';
}
    }
?>
footer.php
<form action="newsletter.php" method="post" class="searchform" >
                                <input  type="text" placeholder=" type your email" name="email" />
                                <button type="submit" class="btn btn-default"><i class="fa fa-arrow-circle-o-right"></i></button>
                                <p >come on with us to know everything for us</p>
                            </form>

1 个答案:

答案 0 :(得分:0)

使用会话存储成功消息,您可以在重定向后打印它。