i would like to come out with my own forum using PHP. Can some one tell me how many table in the database i need to put and explain to me how each table is related in the forum and last how the forum work... Thanks a lot

Can some one tell me how many table in the database i need to put and explain to me how each table is related in the forum and last how the forum work...

Building even a basic forum is a pretty big project. I recommend working on some smaller projects first. All of your questions are very broad questions that you should be able to at least start to answer yourself before you start trying to build a forum.

If you're determined, my recommendation is that you download some freely-available forum software. phpBB is, of course, the most popular, but a good place to start would be miniBB for its simplicity. Download that and look at the source -- try to understand the database structure and how posting works. If you can grasp those things in at least a basic way, then you might be ready to attempt a forum on your own. But if you get completely lost, then you need more practice on smaller projects.

Like I said, this is really a question that you should be able to at least start answering yourself. Think of it this way: Each table in a database stores a particular sort of data. What sorts of data does this forum have? Well, the obvious one is posts. Each post is a record in a posts table in the database. What else? Well, there's information stored about me and you, such as username, password, and profile information, so there's another sort of data that you need a table for.

Think about it a bit. Try to think of all of the different sorts of data you'll need to store and how is the best way to store it. If you can't at least get started on your own, then even if I did tell you exactly what tables you need a forum would still probably be too broad a project for you at this time.