Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
Mi codigo es el siguiente:
Código PHP:
<?php
include('includes/conexion.php');
function ObtenerPost()
{
$query = mysql_query("SELECT * FROM posts");
While( $post = mysql_fetc_assoc($query)){
print($post['titulo']);
}
}
?>