Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Who is online?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Who is online?

Postby Virtuoso » Tue Jul 22, 2003 12:19 pm

how do I create something that states which memebers are online?

thanks
User avatar
Virtuoso
php-forum Active User
php-forum Active User
 
Posts: 268
Joined: Mon Jul 21, 2003 7:05 am

Postby swirlee » 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.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby Virtuoso » Tue Jul 22, 2003 12:46 pm

well right now this is what i made

http://www.lelements.net/posts/index.php

is that enough to make complex scripts?
User avatar
Virtuoso
php-forum Active User
php-forum Active User
 
Posts: 268
Joined: Mon Jul 21, 2003 7:05 am

Postby swirlee » 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.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.