<?php
mysql_connect ('localhost', 'root', 'password') ;
mysql_select_db ('manchesternews');
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
die("Invalid ID specified.");
}
$id = (int)$_GET['id'];
$sql = "SELECT * FROM newsreel WHERE id='$id' LIMIT 1";
$result = mysql_query($sql) or print ("Error has incurred. Please look at your code.<br />" . $sql . "<br />" . mysql_error());
while($row = mysql_fetch_array($result)) {
$articletitle = ($row['articletitle']);
$article = ($row['article']);
?>
<p><strong><?php echo $articletitle; ?></strong><br /><br />
<?php echo $article; ?><br /><br />
<hr /></p>
<?php
}
Basically the above code works but only if the user then puts "http://example.com/feed.php?id=3"
They have to type ?id=3 in.
Is it possible on the feed.php to have the $articletitle displayed and when that is clicked it gets the "id=3" which loads the "fee.php?id=3" Thanks.