【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-check_file.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
session_start();
include "conn/conn.php";
if($btn_tj<>""){
$title=$_POST[txt_title];
$author=$_POST[author];
$content=$_POST[file];
$now=date("Y-m-d h:i:s");
$sql="insert into tb_article (title,content,author,now) Values ('$title','$content','$author','$now')";
$result=
mysql_query($
sql);
if($result){
echo "<script>alert('恭喜您,你的文章发表成功!!!');window.location.href='index.php';</script>";
}
else{
echo "<script>alert('对不起,添加操作失败!!!');window.location.href='index.php';</script>";
}
}
?>