mysqlinsertphp
if($action == 'insert'){ //接收数据 $title = empty($_post['subject']) ? '' : $_post['subject']; $content = empty($_post['content']) ? '' : $_post['content']; $user_id = $_session['myuser']['id']; $create_ad = time(); $summary = empty($_post['summary']) ? '' : $_post['summary']; $category_id = empty($_post['category_id']) ? '' : $_post['category_id']; $cover = empty($_post['cover']) ? 'mr.jpg' : $_post['cover']; $state = empty($_post['submit']) ? '' : $_post['submit']; $is_delete = 0; $tags = ''; //验证 if($category_id == '' || $title == '' || $content = '' || $summary == ''){ header('refresh : 2 ; url = article.php?a=add'); echo '输入的信息有误,请重新输入'; exit; } //入库 $sql = "insert into tn_article values(null, '$title','$content', $user_id, $create_ad, '$summ









