Gossamer Forum
Home : Products : DBMan : Customization :

Help with forcing users to add record

Quote Reply
Help with forcing users to add record
I have a mod in my db that automatically sends a user to the add form when they sign in if they havent already added a record. This is the code that I have:

Code:

$in{'Userid'}=$db_userid;
my ($status, @hits) = &query("view");
if ($status ne "ok") {
undef(@db_cols);
do("ads.cfg");
&html_add_form;
return; }



The reason it looks like this is because when a user logs in to one db, I need the add from my other db (hence ads.cfg) to come up. Well that comes up fine, but when I go to input the info and click on submit to add a record, it gives me an error that not all the fields were filled in, but shows the add form from the original main db.
So in other words, a user logs into my adusers.db and gets the add form from ads.db. When they click on submit, the add form from adusers.db shows up with errors that it wasnt filled out.

Does anyone know how to fix this? Also, can you tell from my code whether this is set to only force the user to add a record if they havent already done so? I dont want them to be sent to the add form if they already have a record listed. This code was given to me by Kellner (thanks :) ), but it isnt working.

EDIT:

I also have a field in my ads add form for the users userid so that can be kept with the record, but I need it to be automatically filled in. It auto fills it just fine with the regular add link, but how can I get it to auto fill the userid field with this mod??

Last edited by:

wdu2002: Jul 15, 2002, 9:27 AM
Quote Reply
Re: [wdu2002] Help with forcing users to add record In reply to
Can anyone help?? Please?? Wink