21,886
社区成员
发帖
与我相关
我的任务
分享
if($_POST['submit']){
$sql = "INSERT INTO `ibog_leveword` ( `id` , `user` , `title` , `content` , `time` ) VALUES (NULL, '{$_POST['user']}', '{$_POST['title']}', '{$_POST['content']}', NOW() )";
$re = mysql_query($sql);
if($re){
echo '成功';
}else{
echo '失败';
}
}
<?php
include("conn.php");
if(isset($_POST["submit"])){
$user = trim($_POST["user"]);
$title = trim($_POST["title"]);
$content = trim($_POST["content"]);
$sql = "insert into ibog_leveword (`user` ,`title` ,`content` ,`time`) values('$user','$title','$content',nows())";
$result = mysql_query($sql);
if($result) echo 'ok';
else echo 'fail';
}
?>