displaying authors only.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
edenikko
Forum Newbie
Posts: 3
Joined: Fri Nov 18, 2005 5:20 am

displaying authors only.

Post by edenikko »

how do i show the author's posts only.


example i clicked the author "Nicholas" it goes to a page that shows all the posts made by "Nicholes"
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

On this forum?
Click 'search' then fill in the 'by author' box.
edenikko
Forum Newbie
Posts: 3
Joined: Fri Nov 18, 2005 5:20 am

Post by edenikko »

oo..im sorry i lack of details...

im making a blog... :D how do i do it?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

So, you want help on how to make a blog?

Try here:
http://www.asp-php.net/ressources/liens.aspx?id=1079
edenikko
Forum Newbie
Posts: 3
Joined: Fri Nov 18, 2005 5:20 am

Post by edenikko »

still did not help.. :(

i need to make the page show only posts made by the selected author from a page.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Sorry, my mind reading machine is out of action today, so you will need to post code so we can help.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

it will require somthing like this

Code: Select all

$sql = '
  SELECT
    *
  FROM
    table_name_goes_here
  WHERE
    author = "'.$author_that_was_selected.'"
';

$query = mysql_query($sql) or die(mysql_error());

while ($info = mysql_fetch_assoc($query))
{
//display all of their messages or do whatever you want here.
}
this is all thinking that your table layout is a certain way and whatnot. we would really need to see some code to make it really work for you.
Post Reply