Gossamer Forum
Home : Products : DBMan : Customization :

if userid then

Quote Reply
if userid then
Hi Guys,
Can someone plleeease help me with the following:
I am trying to setup defaults for individual users for sub_add_form only. In other words if userid = joe and he wishes to add the add_form contains his default Tel and Email. User george will obviously have different values. I tried:

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

at the start of sub_add_form, but I always end up with the last if statements block values. I am sure this has been a common question, but I cannot find anything on previous postings. Any help would be greatly appreciated.

Many thnaks in advance.
Greg
Subject Author Views Date
Thread if userid then handmade 1601 Oct 18, 1999, 5:23 AM
Post Re: if userid then
JPDeni 1570 Oct 18, 1999, 6:46 AM
Post Re: if userid then
handmade 1565 Oct 18, 1999, 7:37 AM
Post Re: if userid then
JPDeni 1567 Oct 18, 1999, 8:00 AM
Post Re: if userid then
kipt 1575 Oct 18, 1999, 8:07 AM
Post Re: if userid then
handmade 1555 Oct 18, 1999, 8:19 AM