<?php
include_once 'common.php';
include 'conn.php';

$sql_add="insert into `message` (`id`,`user`,`title`,`content`,`lastdate`) values ('','$_POST[user]','$_POST[title]','$_POST[content]',now())";
if ($_POST[submit]){
    mysql_query($sql_add);
    if (mysql_affected_rows()<1){
        echo "<script> {window.alert('留言发布失败,请从新留言或与管理员联系');location.href= 'add.html'} </script>";
    }
    else {
     echo "<script> if(confirm( '留言发布成功,是否返回留言页? ')) location.href='add.html';else location.href='list.html'; </script>"; 
    }
}

?>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-02
  • 2021-06-26
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2019-12-11
相关资源
相似解决方案