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.

I have tried to syntax highlight it to make it easier for any helpers to follow it.

It works well, but I need to understand how it actually tells what parts go in what frames.

Normally with frames, each frame is a separate file, but not so in this php script. For the life of me, I cannot figure out WHY the submit button and tex bar etc are in the bottom frame and the posts are in the top frame.

What part of the code dictates that??

I need to know this so that I can add a third frame showing a list of all users logged in.

If you can explain it, please remember that I have only been doing web scripts for about 4 weeks.

Do you see how the src of the frames are pointing to the script itself? When the browser reads that part, it retrieves those pages along with the arguements, in this case the variable passed is $action. So, in each frame, the script is executed again. If you'll look at the top, there's a small series of if conditional statements checking the value of $action:

If $action is empty, it executes the HTML/frames portion of the script (the ShowLoginForm() function). If $action is posts, forms, or enter, the script will instead execute the other functions. Make sense?

Consequently, there are a few minor errors with the script also -- namely some misplaced ;'s.

-Colin

Colin Anderson Ambition is a poor excuse for those withoutsense enough to be lazy.