//postで受け取ってアップデート
$post_title = $_POST['post_title'];
$post_content = $_POST['post_content'];
if(!empty($post_title) and !empty($post_content)){
$post_content = "
“.$post_content.”
“;
$my_page_data = array(“post_content”=>$post_content,”post_title”=>$post_title,”post_status”=>’publish’,”post_type”=>’page’,”comment_status”=>’closed’,”post_date”=>date(“Y-m-d H:i:s”),”ping_status”=>’closed’);
$where = array(“ID”=>’4973′);
/*
echo “
my_page_data";
var_dump($my_page_data);
*/
global $wpdb;
$wpdb->show_errors();
$insert = $wpdb->update(
'wp5_posts',
$my_page_data,
$where
);
$wpdb->flush();
}
?>
edit_post_link( );
?>