[php]
<?php if (isset($_GET['id'])){ ?>
<?php
include 'includes/data.php';
$query = "select * FROM $_GET[page] WHERE id = '$_GET[id]'";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$title = mysql_real_escape_string($title);
?>
<?php } ?>
[/php]
Related Posts to <?php echo $row['title']; ?>
<?php $querys = "SELECT * FROM $_GET[page] WHERE article LIKE '%\$title\%' && id != '$_GET[id]'"; $results = mysql_query($querys); while ($rows = mysql_fetch_array($results)) {
echo ‘<a href=index.php?news&page=’.$_GET[page].’&id=’.$rows[id].’>’.$rows[title].’, ';
}?>
For some reason it will not output the posts that are like the other articles in the database.