-1
없이 MySQL로 행을 삽입하는 데 실패합니다. 실행하면 데이터를 INSERT하지 않고 오류를 표시하지 않습니다.코드 내 쿼리로 아래 (기능) 코드가 오류
if (isset($_POST['posts_title'], $_POST['posts_content'], $_POST['category_id'])){
$title = trim($_POST['posts_title']);
$contents = trim($_POST['posts_content']);
add_posts($title, $contents, $_POST['category_id']);
$Posts_id = mysql_insert_id();
header('Location:Adminpage.php?posts_id ={$Posts_id}');
die();
}
?>
[오류보고] (http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php)가 켜져 있습니까? 비표준 라이브러리가 설치되어 있지 않으면,'msql_real_escape_string()'이 에러를 발생시킵니다. –
코드를 검토하십시오 ...'msql_'이란 무엇입니까? –