Gossamer Forum
Home : Products : DBMan : Customization :

auto modifying a record

Quote Reply
auto modifying a record
I'm making a membership database.. this includes private messages (not email)....

What I need to do is.. change the status of the message from 'New' (for a new message) to either 'Read' (when it's viewed) or to 'Replied' (If the message is replied to).

'New' is included when writing the message.. but I need a small sub-routine to change 'New' to either 'Read' or 'Replied' automatically without the user knowing or having to manually do anything..

basically I think I need to be able to modify the message.. but I don't know how to do it without going to another screen and manually changing it.

Any help is much appreciated Smile

------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
At what point do you want the record modified? As soon as it is displayed by html_record? And what about changing it to "Replied"? How do users reply to messages?


------------------
JPD





Quote Reply
Re: auto modifying a record In reply to
hi Smile

For the 'Read' part.. I would like it done as the message is loaded (viewed)..

For the 'Replied' part.. I can put the call for the routine on the 'Successfully sent' page I have..

So if a sub-routine can be made.. I can fit in the calls to use the routine where I need them.. I just have no idea how to write (modify) a record automatically..

I'm using the following variables within the 'dbmail' database..

'To', 'Subject', 'Date', 'Message' and 'New'

Thanks for the help Carol Smile
Quote Reply
Re: auto modifying a record In reply to
Well, let's start with changing the status to "Read" when the record is displayed.

What -- exactly -- is the name of the field that you will be changing? It's easier for me if I give you the code you need, rather than guessing at the field name and reminding you that you will need to change it to match your own database. I often forget that. Smile


------------------
JPD





Quote Reply
Re: auto modifying a record In reply to
The name of the field is

'$new'

Smile thanks

------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
I don't think that is correct. Do you really have $new listed as the name of the field in the database? With a $? I need the *exact* name of the field as defined in your .cfg file.

If your field name is really $new, you should change it, because you're going to have no end of trouble.


------------------
JPD





Quote Reply
Re: auto modifying a record In reply to
OOPS Frown

Sorry.. gave that answer when really tired..

The field name is 'New'

The string I use to assign the variable is '$db_new'

Long hours with elderly people, and coding just don't mix Smile

Sorry for the mix up.



------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
Hi Smile

I was also wondering if anyone had found a web board that worked with DBman?

------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
I'm sorry. I must have missed your previous post.

I'm going to be going to bed in just a few minutes, but I'll get your code for you as soon as I can.

Regarding your most recent question, do you mean one that uses the same password file? I haven't found one. Smile


------------------
JPD





Quote Reply
Re: auto modifying a record In reply to
Many thanks for your time Carol Smile

Maybe Alex.. or yourself, could write a forum that could be used with DBman? (very small hint) Smile Smile



------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
Just hoping you haven't forgotten me Smile

------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
Here's the post I was refering to in the other topic Smile Smile

------------------
-----------
millsie :)
Quote Reply
Re: auto modifying a record In reply to
Hi Carol...

I think I've sortof found what I needed to achieve my goal... (in another similar request..)

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001156.html

The only difference is.. I don't want it to modify the message at login.. but I do want to modify the message as it is viewed.. and then as it is replied to (if the message is repied to)

The only field I need to change in the record, is called 'New'




------------------
-----------
millsie :)