Forum Moderators: coopster
<?php mysql_connect('localhost', 'ash', 'lash') or die('Connection Failed');
mysql_select_db('lash') or die('Database not found');
$id = (int) $_GET['id'];
$result = mysql_query("SELECT title, dtl, meta_description, meta_keywords FROM page WHERE id=$id");
if (!mysql_num_rows($result)) { header('Location: 404.php', true, 404);
die();}$row = mysql_fetch_array($result);$title = stripslashes($row['title']);
$dtl = stripslashes($row['dtl']);$meta_desc = stripslashes($row['meta_description']);$meta_keys = stripslashes($row['meta_keywords']);?><html><head><meta name="description" content="<?php echo $meta_description; ?>" /><meta name="keywords" content="<?php echo $meta_keywords; ?>" /><title>MySite.com - <?php echo $title; ?></title></head><body><h1><?php echo $title; ?></h1><?php echo $dtl; ?></body></html>