Gossamer Forum
Home : Products : DBMan : Customization :

Re: if userid then

Quote Reply
Re: if userid then In reply to
Two things.

First, use eq instead of =. Second, for all the "middle" options, use elsif instead of else.

Code:
if ($db_userid eq "joe") {
$rec{'Tel'} = "375 6230";
$rec{'Fax'} = "375 6450";
$rec{'Email'} = "joe\@server.com";
}
elsif ($db_userid eq "george") {
$rec{'Tel') = "899-0128";
$rec{'Fax'} = "899-0151";
$rec{'Email'} = "george\@server.com";
}
else {
&html_add_failure
}

(I forget the eq thing all the time! Smile )


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





Subject Author Views Date
Thread if userid then handmade 2055 Oct 18, 1999, 5:23 AM
Post Re: if userid then
JPDeni 2009 Oct 18, 1999, 6:46 AM
Post Re: if userid then
handmade 2004 Oct 18, 1999, 7:37 AM
Post Re: if userid then
JPDeni 2006 Oct 18, 1999, 8:00 AM
Post Re: if userid then
kipt 2014 Oct 18, 1999, 8:07 AM
Post Re: if userid then
handmade 1996 Oct 18, 1999, 8:19 AM