The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Repost.. [EDIT: I've Done It!!]

I posted this the other day, and while someone was kind enough to hang with me for about 12 hours and try to get it to work, it didn't. So I want to try again but hear me out.. the methods that were being sent to me weren't quite the method I figured to be easiest. Although I am the new guy. Please bear with me, getting the forums function is my main goal, as it is the basis of the site. Anyway, here goes: (I apologize in advance for whatever headaches I may cause)

Ok. I'm trying to make some halfway functional forums. Now, I have the catagories in the database, and pulling from it in my forum.php. What I want, is for the user to click the category name, and it goes to forums2.php and drops down and lists the forums in whatever category they clicked. I assumed it would use this:

forums.php works fine. I imagine forum2 would just be an altered version of this one, so that when it pulls the category thats sent through the url (with cat_id), it will also list the forums that are associated with it and list them.

I'm thinking that just before all the <TD> starts looping it needs to say something like "if the cat_id of the first one you list == $cid, then list the forums that are attached after"

and then again after the <TD> where the $i++ is, tell it the same thing. (the first one just accounts for the top category it spits out, right?

EDIT: or what about on the query line itself? Can I have it query categories to list, and also to query forums for the cata.... hey wait. I gotta query forums at some point for this to work at all anyway, right?

Forum.php someone sees a list of categories. They click one. They go to forum2.php. It loads the same thing, except whichever one they clicked on "opens up" and drops down to show the sub categories.

Now, I've got forum2.php to where it pulls in the variable you send through the url by clicking the link and calls it $cid.

I've got it to where it pulls in the data from the "forums" table based on that $cid.

I've got it to where it lists the categories as it should, and in the "last post by" colum, it lists the subcategories it pulled from "forums" as it should, put it there for testing.

NOW, what I need is for those forums names to go under the categorie that was clicked on to begin with.. but I'm not sure how to set that loop up.

I beg of you, I'm so close!

Here is the website. You are going to see errors because you are not logged in, at the top of the page. Nevermind those. You'll also see some that show after the forums run out of things to say, but there are still categories listed. You'll see what I mean

Click here, then pick a category, click it, to see what it does: (I suggest movies, to be error free.. same number of rows needed)