|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
1. I have a table which is suppose to keep track of when people log in and out. It has two timestamp columns. They are both set to the length of 12 (MMDDYYHHMMSS(I thinkt hat's right I'll have to double check)THe first one is for when they log in and the second for when they logout. But obviously the second timestamp column doesn't update itself. How do I get the time in there when they logout?
2. Is there anyway for me to have that logout column filled if the session expires? 3. On my content Management I have a form for the users to enter thier news. I would like to have a way to put in URLs and use bold and italics like here on these forums. I would like it to be done in a similar manner as here with "[]" around b, url etc. How do I go about setting something like that up? ![]()
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#2
|
|||
|
|||
|
Post a new exit time to the database, each one overwriting the last one. The last posted time should be close to their actual page exit. (You'll never get an exact time anyway.)
The answer to your second question is jaavascript. Or, you can have php examine the script and add tags when it sees things like http www or @ |
|
#3
|
|||||
|
|||||
|
Re: Two PHP/MySQL and 1 PHP/Forum question
Quote:
Ok, firstly even though this isnt important a time stamp is YYYYMMDDHHMMSS. 14 chars long. To update the timestamp, your going to have to run an update query when the logout. eg update table set logouttime = now() where field = id Quote:
as rickwright said your going to need javascript to do this. This would be using the window.setTimeout function in javascript after x ammount of time, if the page isnt refreshed within that 20 min, force a new pop-up window and run a query that adds the field data. Quote:
To do that, it involves regexp. Im still learning regexp so I wouldn't know how to do this, but it involves some extremely advanced regexp expressions. |
|
#4
|
|||
|
|||
|
I'm currently writing my own forum. I'm using this type of setup to help with UBB Code. It doesn't matter whether the user uses lowercase or uppercase.
PHP Code:
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Two PHP/MySQL and 1 PHP/Forum question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|