Gossamer Forum
Home : Products : DBMan : Customization :

Subject: Two IF/ELSE routines in sequence?

Quote Reply
Subject: Two IF/ELSE routines in sequence?

I have two fields in my DB which are, VALIDATED and ACTIVE.
When a record is added VALIDATED=no and ACTIVE=yes, the administrator then checks the record and modifies VALIDATED to yes. When the author wants the record removed they modify ACTIVE to no. The administrator then searches for all records where active=no and deletes them.

The problem is, in the html.pl file I want the following,

if VALIDATED=no and ACTIVE=yes or no then do not show the record, show a message instead.

if VALIDATED=yes and ACTIVE=yes then the record is displayed.

if VALIDATED=yes and ACTIVE=no then nothing is shown at all.

I have tried placing one IF/ELSE routine inside another but keep getting an error.

Is it possible to use ELSEIF? or similar? Or to put two conditions into the IF statement?

Does anyone have an idea?

Thanks, Gaslight.

Quote Reply
Re: Subject: Two IF/ELSE routines in sequence? In reply to
Ahh, its ok ive found the problem, I had a systax error.

Im now using two IF/ELSE routines one inside the other.

If there is a better way please let me know.