Click here to Skip to main content
15,886,578 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: Problem with Arrays in PHP Pin
cjoki7-Jan-10 5:35
cjoki7-Jan-10 5:35 
GeneralRe: Problem with Arrays in PHP Pin
David192216-Jan-10 12:31
David192216-Jan-10 12:31 
GeneralRe: Problem with Arrays in PHP Pin
fly90416-Jan-10 13:15
fly90416-Jan-10 13:15 
QuestionProblem with check boxes Pin
sarang_k5-Jan-10 19:57
sarang_k5-Jan-10 19:57 
AnswerRe: Problem with check boxes Pin
cjoki7-Jan-10 5:25
cjoki7-Jan-10 5:25 
QuestionPHP Member Pages... Need major help... Pin
thebiostyle1-Jan-10 7:46
thebiostyle1-Jan-10 7:46 
AnswerRe: PHP Member Pages... Need major help... Pin
Smithers-Jones1-Jan-10 11:09
Smithers-Jones1-Jan-10 11:09 
AnswerRe: PHP Member Pages... Need major help... [modified] Pin
enhzflep1-Jan-10 11:25
enhzflep1-Jan-10 11:25 
Well, since you've presumably used mySql to store the user details, why not add a field to the database called something like lastLoginTime.
I'd probably fill that field with the Unix time, since it's much easier to compare two integers than 2 strings.

e.g
$curLoginTime = time(); // number of seconds since Jan 1 1970
Make sure you save this data to the user's lastLoginTime mySql entry.

All you have to do then is run a query that retuns all users.
Run the time command again, subtract 24 * 60 * 60 seconds from the result, and that's the number of seconds elapsed from 1 Jan 1970 to 24 hours prior to the current time. If the user's lastLoginTime is an integer higher than this number, you just found someone that logged in in the last 24 hours.


As for the user management panel thing - that's also relatively easy. You just make sure that every piece of info on the screen you wish to edit has a corresponding field in the mysql database.
Though, I will mention a small thing that may otherwise cause frustration: The general form of the url for a user's personal page will be "sitename.com/members/filename.php?user=userName" - The reason for the difference is that you _don't_ want a new php page for each user, you want to create one page that will handle all of them, just pass the actual user as a variable to the statistics/editing page.


I'd just be inclined at this point of the learning-curve to hit google with "free forum php code" then scan the results for an example that does what you want, or uses a method of achieving something else that you can adapt to your own needs.
Failing that - I'd still use somebody else's as a starting block, just try to add new features to their code.


smithers-jones wrote:
But you won't find anybody here, who will present the whole project to you

Me included. While I did indulge the previous request - That was a comparatively small one.
Smithers-jones suggests some useful tactics. Understanding code and not just copying it is perhaps the best advice one can give a fellow coder.


Good Luck!Thumbs Up | :thumbsup:

modified on Friday, January 1, 2010 5:31 PM

GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle1-Jan-10 16:14
thebiostyle1-Jan-10 16:14 
GeneralRe: PHP Member Pages... Need major help... Pin
enhzflep3-Jan-10 15:54
enhzflep3-Jan-10 15:54 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle3-Jan-10 16:28
thebiostyle3-Jan-10 16:28 
GeneralRe: PHP Member Pages... Need major help... Pin
enhzflep4-Jan-10 12:22
enhzflep4-Jan-10 12:22 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle22-Jan-10 16:09
thebiostyle22-Jan-10 16:09 
GeneralRe: PHP Member Pages... Need major help... Pin
Graham Breach22-Jan-10 23:31
Graham Breach22-Jan-10 23:31 
GeneralRe: PHP Member Pages... Need major help... [modified] Pin
thebiostyle23-Jan-10 4:33
thebiostyle23-Jan-10 4:33 
AnswerRe: PHP Member Pages... Need major help... Pin
Graham Breach23-Jan-10 5:20
Graham Breach23-Jan-10 5:20 
QuestionRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 8:51
thebiostyle23-Jan-10 8:51 
AnswerRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 9:33
fly90423-Jan-10 9:33 
NewsRe: PHP Member Pages... Need major help... [modified] Pin
thebiostyle23-Jan-10 9:51
thebiostyle23-Jan-10 9:51 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 10:38
fly90423-Jan-10 10:38 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 10:47
thebiostyle23-Jan-10 10:47 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:00
fly90423-Jan-10 11:00 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 11:18
thebiostyle23-Jan-10 11:18 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:29
fly90423-Jan-10 11:29 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:23
fly90423-Jan-10 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.