$prev_parent_thread and `thread` < $thread "; $update_thread = mysql_query($query, $dbconn); $insert_data="insert into `freeboard` ( `idx` , `name` , `passwd` , `title` , `date`, `time` , `hit` , `contents`, `thread`, `depth` ) VALUES ( '' , '$name', '$passwd', '$title', curdate(), curtime(), '', '$contents', '$now_thread', '$now_depth' );"; $insert_result=mysql_query($insert_data, $dbconn); if(!$insert_result) { err_msg("답글 쓰기 실패"); } redirect("read.php?thread=$now_thread"); ?>