<?php //just a few tests for my database layer include("./lib/db2.php"); $db = new DB('blog'); $db->connect("localhost", "root", "*******"); $db->prepare("insert into wp_posts (post_title, post_content) values ('test post', 'this is just a test post');"); $db->send();//queries the database with the contents of $db->prepare(); $title = $db->row("select * from wp_options where option_id = 2;"); $posts = $db->select("select * from wp_posts"); echo "<h2>".$title['option_value']."</h2>"; foreach($posts as $post) { echo "<dl>" ."<dt>".$post['post_title']."</dt>" ."<dd>".$post['post_content']."</dd>" ."</dl>"; } $db->disconnect();?>