Jump to content

freddy

Members
  • Posts

    77
  • Joined

  • Last visited

freddy's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. What exactly are you looking for in a shoutbox?
  2. freddy

    Php Ftp

    Instead of move_uploaded_file() try using copy(). www.php.net/copy()
  3. It is trying to get the document from a directory called form. If you have all your form-mail documents in the same directory then you can delete "/form" and leave the mailit.php like this: <form action="mailit.php" method="post" enctype="multipart/form-data" name="form1"> Hope that helps...
  4. For php you should visit www.php.net and www.phpfreaks.com On these two site's you should be able to find everything you need to create these forms and their controling structures. It's a start
  5. I'm just curious what others are doing with content and user management. What functionallity have you build in and did you write all the code yourself or did you grab it form hotscripts.com for example? And if you are willing to share, what little tricks did you use to get what you want. My guess is that quite a lot of people are trying to make something like this and this might be a nice way of helping eachother out learning what you can do with a little PHP and MYSQL knowlegde ... So let's hear it
  6. freddy

    Php Ftp

    Maybe you could add your code here so we can see what's wrong?
  7. RENAME TABLE Syntax RENAME TABLE tbl_name TO new_tbl_name[, tbl_name2 TO new_tbl_name2,...] The rename is done atomically, which means that no other thread can access any of the tables while the rename is running. This makes it possible to replace a table with an empty one: CREATE TABLE new_table (...); RENAME TABLE old_table TO backup_table, new_table TO old_table; The rename is done from left to right, which means that if you want to swap two tables names, you have to: RENAME TABLE old_table TO backup_table, new_table TO old_table, backup_table TO new_table; As long as two databases are on the same disk you can also rename from one database to another: RENAME TABLE current_db.tbl_name TO other_db.tbl_name; When you execute RENAME, you can't have any locked tables or active transactions. You must also have the ALTER and DROP privileges on the original table, and the CREATE and INSERT privileges on the new table. If MySQL encounters any errors in a multiple-table rename, it will do a reverse rename for all renamed tables to get everything back to the original state. RENAME TABLE was added in MySQL 3.23.23. Taken from the MySQL Reference Manual © 2002 MySQL AB Hope that helps
  8. Congratulations guys, Truly well done! Thumbs Up Rock Sign
  9. I was initially trying to find a way to catch a user that closes his browser without actually logging out. The only way to do that is to have a pop-up windows that auto closes when the script is done but then again you can block popups... I'm just lucky that I can educate my users when and if I implement this system.
  10. Ok, ic ... well I don't think that's needed in this case. I suppose a window of 10 to 15 minutes is good enough. How do you think this forum checks it?
  11. My goal is to have an active representation of who is online. Being logged in or out is controlled by sessions...
  12. Here's what I did to check who's active... (I've set to time()-60 for testing purposes) >$inactive_time = time()-60; $inactive_query = "SELECT nick,email FROM users WHERE time >= \"$inactive_time\";"; $do_inactive_query = mysql_query($inactive_query); echo "Users active: "; while ($onlineusers = mysql_fetch_array($do_inactive_query)) { echo "> <a href=\"mailto:".$onlineusers['email']."\">".$onlineusers['nick']."</a> "; } I do however HAVE to do the following to make sure the time is updated for active users. >$ltime = time(); $active_query = "UPDATE users SET time=\"$ltime\" WHERE nick=\"$session_username\";"; $do_active_query = mysql_query($active_query); It's not quite like what you offered but this works just fine... I'm not that great with php and this is basicly just a learning experience for me, it's my first user login and management system I'm making. If you see anything that could be done better here let me know... thanks for the help! Thumbs Up
  13. I guess I will have to go with that then. It's not really accurate since after loggin in you might be busy more then 5 minutes on one page and another user will set your status to "0" and you will not show up as being online untill you go to another page. I know, you can set it to 15 or even 30 minutes but still... It's a temp solution anyway Still wondering if there is a better way to do it... Maybe by giving the "idle" user somekind of notice that he is about to timeout or something but to do that in php? Head Bash I love this Smilie
  14. Hi everyone, i'm kinda working a user account system using php sessions and mysql. Sofar I have been able to create the everything except for one thing. Lets say a user logs in, I then set the user_active record to 1 meaning the user is logged in. If the user logs out by clicking the logout button the record is set to 0 meaning he has logged out. This al works fine, but! when a user logs in and later on closes his browser without clicking log out the session is destroyed of course and the user is logged out but user_active record remains on 1. Does anyone know how I can fix this problem?
×
×
  • Create New...