Gossamer Forum
Home : Products : DBMan : Customization :

Check 2 c if user has entered a record

Quote Reply
Check 2 c if user has entered a record
Hi, and sorry, a newbie question. How can I check at Login if a user has a record in the database so i can therefore only give them a link to add a record, instaed of view/modify/etc.

Thanks in advance.
Quote Reply
Re: [flymo] Check 2 c if user has entered a record In reply to
Yes , you can

my $rec = get_record(USERID);

if (!$rec){ print "Please add one record";}

Cheers,

Cheers,

Dat

Scripts installation and plugin creation
Plugins
Quote Reply
Re: [tandat] Check 2 c if user has entered a record In reply to
$rec should be %rec I think.
Quote Reply
Re: [tandat] Check 2 c if user has entered a record In reply to
HI, this doesn't work for some reason and even after trying to change the variable to something that does not exist, it doesn't even through an error. What happens is that anything i have in the "if" statement shows up every time?

Any suggestions appreciated.
Quote Reply
Re: [flymo] Check 2 c if user has entered a record In reply to
Please check the FAQ noted below under the section "Admin - Navigate" where they are various options available to redirect user under certain circumstances.

Hope this helps

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/
Quote Reply
Re: [LoisC] Check 2 c if user has entered a record In reply to
thanks LoisC...got it sorted