<?php $host="localhost"; $user=""; $password=""; $database = ""; $id = ""; $conn = new mysqli($host, $user, $password,$database); if (!$conn) { die('can not connect database! </br> Error: '.mysqli_connect_error()); } $conn->query("SET NAMES utf8"); $sql="select post_content from wp_posts where id='$id'"; $query = mysqli_query($conn,$sql); $array = mysqli_fetch_array($query); $response = $array[0]; //mysqli_close($conn); echo $response; ?>