Arthur Dent
|
| Posted: 06/04/2003, 6:59 AM |
|
I am Building a site in asp+mysql with Codecharge Studio
I Will have a message board where messages can be sent to specific members
after login a member can collect her/his messages.
My question, After a member logs in I would like to alert them to how many
new messages they may have how can i do this.
Thank You.
|
|
|
 |
Tomasz
|
| Posted: 06/04/2003, 7:36 AM |
|
it's quite easy
1.
in table for messages, create field which will contain id of the receipient
2.
create page which count and display messages, use input parameter for this field, set the name: UserID, and type: session
3.
use custom login event to redirect user to this page after logging in
that's all. user logs in and is redirected to page which disply only messages addressed to him/her.
you can even store info if message was read (after entering message details on separate page)
ps.
check the name of the user id variable stored in session for ASP
|
|
|
 |
Arthur Dent
|
| Posted: 06/05/2003, 6:21 AM |
|
Thanks for the reply Tomasz
I need something more simple
what I would Like to do
is after a member has logged in,
I Would have a message somewhere on the page .
Saying "YOU HAVE ONE NEW MESSAGE"
Thanks Arthur.
|
|
|
 |
rrodgers
|
| Posted: 06/05/2003, 7:53 AM |
|
something like this.
NewMessages = CCDLookUp("Count(1)", "MessageTable", _
"UserID = " & CCGetUserID() & _
" AND LastViewDate Is NULL ", _
dbYourConnectionName )
Add a label to your page. Call it NewMessages. You will have to handle the setting of the lastviewdate column when ever the user views the message.
rob
|
|
|
 |
|