Good! Now I understand what you want. So, I gave you the answer. Your second post was the detail.php file.
In there your code only echo’s (print’s) the title. It is set to only display the title. That is how it is coded.
So, the change I showed you would display a little more. You need to alter the echo command to display
whatever you want it to. Right now it just displays the title. So, the code is doing what it was coded for.
Change that line.
Also, in your reader.php file, you post to the detail.php file using this code:
echo “
<a href=“detail.php?title=$title”>$title
”;
So, you are using “title=” as the calling option. Usually, in PHP if a link calls a routine in another file using a parameter then the receiving file (detail.php) would use this info to pull the info using that parameter.
To do that, you use a $_GET command. So, normally, you would do something like:
$title=$_GET[‘title’];
Which would grab the value passed to it. Then, you would use that value to query the DB and pull the correct data from it. You are using some sort of code to pull the info, but, I do not quite understand what it is doing:
$location = “http://query.yahooapis.com/v1/public/yql?q=”;
$location .= urlencode(“SELECT * FROM feed WHERE url=‘http://bibacity.wordpress.com/feed’”);
$location .= “&format=json”;
$rss = file_get_contents($location, true);
$rss = json_decode($rss);
This code loads a file and sorts it into an RSS feed of sorts. But, it does not get the one that you are feeding to it. So, to fix that part up would involve a modification in the for loop. You would have to check to see if the current one is the one that was selected. Then, you would need to display all the data for it. This is one sample of how it would work. (Might not be the best way, but, should work.)
OLD version:
[php]
<?php
foreach($rss->query->results->item as $post)
{
$title = $post->title;
$link = $post->link;
$detail = $post->description;
$content = $post->encoded;
echo "
$title
";
}
?>
[/php]
Altered version with added items:
[php]
<?php
$selected_title = $_GET['title']; // Grabs the one sent to it...
foreach($rss->query->results->item as $post)
{
$title = $post->title;
$link = $post->link;
$detail = $post->description;
$content = $post->encoded;
if ($title==$selected_title)
echo "
$title
";
echo $details . "
;
echo "------------------------------
";
echo $content;
}
?>
[/php]
So, as you see, it grabs the selected title. Then, loads the RSS feed. Then, parse thru each feed until it sees the selected title and then displays some items from it.
Hopefully that is what you are looking for. Good luck!