Im real confused on how to explain this , so im going to try my best ....
I have profiles on my website where people can join , write articles , and then other user's can leave comments (blasts) on their articles.
If my profile was "Shocc" my URL would be /profile.php?u=shocc
If you came to my profile , and left me a blast .. Im trying to get:
1. What you said
2. When you said it
3. Your photo ( filename stored in mysql , image stored on harddrive)
Ive got the first 2 Done. I use smarty as my template engine , So i get all blasts for the user's profile , in our example "Shocc" , and display them.
But im trying to display the picture of the person who left the blast. So i must query the database For each blast that was left , and get the photo_filename for that user who left it.
Since i use smarty , i get the blasts from mysql then assign them into an array
while($row = mysql_fetch_array) {
$blasts[] = $row
}
That allows me to goto my template and use Smarty's foreach
{foreach item=entry from=$blasts}
Then the data is avaliable for me to use in my template.
If i want to display a blast i simple use {$entry.blast} and for the person who it was from i use {$entry.from}
So , since im trying to get an outside source( the users photo who left the blast ) and it's not really a part of the blast itself ( remember , when a user leaves a blast , the only things that are stored is to , from , time , and the blast)
Im really stuck on how i can do this ..... It seems so simple , displaying the picture of the person who left the blast ...
Any ideas on how i could do this , if i havent lost everyone by now