Page 1 of 1
Who is online?
Posted: Tue Jul 22, 2003 12:19 pm
how do I create something that states which memebers are online?
Posted: Tue Jul 22, 2003 12:43 pm
Virtuoso. I like you, but you need to slow down! Learn
the language before you start trying to create complex scripts. Go buy, borrow, or rent a good instructional PHP book. Or read a few beginning PHP tutorials. Start with very very simple scripts. It's boring, but it's how you learn. Learn to do things one at a time
. Read the PHP documentation starting with the Getting Started
section, then read the Language Reference
section, though you may not be ready for chapters 14 and 15 just yet. Write some simple, useful scripts to begin with. Don't try to create a forum or a content management system just yet. If you come across something you don't understand, even in your own code, then stop and read about it until it makes sense, only after which you should proceed. Just slow down.
Posted: Tue Jul 22, 2003 12:46 pm
well right now this is what i made
is that enough to make complex scripts?
Posted: Tue Jul 22, 2003 2:00 pm
Alright, I feel as though I spoke rather harshly. The script you demonstrate certainly shows a lot of skill. But if you're able to create that, and if you truly understand exactly what you've written there, I must ask: why aren't you able to come up with some of these answers on your own? When I want to make a script, I don't log onto this board or any other and say, "how do I do this??", I sit with a pen and paper or with my PHP editor and think about it until some ideas come to me, or I go to Google to and see if someone's already done just what I want to do (unless my purpose is specifically to learn how to do something). Then, later on, if I have more specific questions, I refer to the documentation, Google, the archives of this forum, and if I still don't have an answer, then I ask the question.
So think of it this way: You want to write a script that will tell you which members are online. How can you do this? What do you know about the users, or what can you find out about them? Can you find out if they are connected right now? Well, HTTP doesn't quite work that way -- once a user finishes downloading the current page, they are disconnected immediately. So how do we solve this? Sounds like a sessions problem to me. If you think about it for awhile, I think you can answer some of these questions. Or you can go to Google.