PHP Classes

File: templates/show_data_db.php

Recommend this page to a friend!
  Classes of Costin Trifan  >  AbsTemplate  >  templates/show_data_db.php  >  Download  
File: templates/show_data_db.php
Role: Application script
Content type: text/plain
Description: The database connection template file
Class: AbsTemplate
Template engine based PHP script templates
Author: By
Last change:
Date: 13 years ago
Size: 475 bytes


Class file image Download
:: Retrieve and display all posts from a Wordpress blog
function GetPosts()
$con = mysql_connect('localhost','username','password');
$query = mysql_query("SELECT post_title FROM wp_posts",$con);
$html = '';
$row = mysql_fetch_assoc($query))
$html .= '<p><strong>'.$row['post_title'].'</strong></p>';


    <h2> {title} </h2>

    <?php echo GetPosts(); ?>

For more information send a message to info at phpclasses dot org.