當小弟我留言結束後,點擊一個alert返回前一頁

來源:互聯網
上載者:User
當我留言結束後,點擊一個alert返回前一頁
$data['univ_name']=$id;
$data['user_name']=$user_name;
$data['user_comment']=$_POST['user_comment'];
$data['user_comment_good']=$score;
$data['user_comment_money']=$_POST['user_comment_money'];
$data['user_comment_date']=$_POST['user_comment_date'];
$User->add($data);
$result = $User->select ();
$this->success("留言成功");
}
$this->user_state = $user_state;
$this->display();
這是一段留言代碼,當我成功時候$this->success("留言成功"); 它會跳出來一個頁面,這個頁面不好看,
現在我想跳出一個alert 或者跳轉頁面也行,但是當我點擊alert的確定按鈕時候我希望它能夠返回到我寫留言的那頁
準確說就是我想擷取success的URL 讓我的alert也能實現回去前一頁的效果 請問要怎麼做好? 最好有個代碼什麼的 如果大家說的我不明白 我還能研究一下代碼。。
------解決方案--------------------
$this->success("留言成功");
改為

echo '';
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.