Gossamer Forum
Home : Products : DBMan : Customization :

Logon userid error -- cannot logon -- can view records using default

Quote Reply
Logon userid error -- cannot logon -- can view records using default
Problem:

Line:6
char:1
Error: 'document.form1.userid' is null or not an object
Code:0
Url:
http://www.cpphsaa.org/cgi-bin/dbman/db.cgi

DbMan was working fine and then I added a forgotten Input line. EventDate. This was placed in the html.pl file and the definition in the default.cfg file and this affected the number of the following:

# The number of your email address field
$email_field_number = 14;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 18;

Both the above match the Definitions:

%db_def = (
'ID' => [ 0, 'numer', 5, 8, 1, '', ''],
'Category' => [ 1, 'alpha', 0, 11, 1, '', ''],
'Type' => [ 2, 'alpha', 0, 13, 1, '', ''],
'ClassYr' => [ 3, 'alpha', 4, 4, 0, '', ''],
'EventDate' => [ 4, 'alpha', '40x6', 1000, 0, '', ''],
'EventName' => [ 5, 'alpha', 40, 50, 0, '', ''],
'RSVP' => [ 6, 'alpha', 40, 70, 0, '', ''],
'Location' => [7, 'alpha', '40x2', 1000, 0, '', ''],
'Cost' => [ 8, 'alpha', '40x2', 1000, 0, '', ''],
'Contact' => [ 9, 'alpha', '40x4', 1000, 1, '', ''],
'EventDesc' => [10, 'alpha', '40x6', 1000, 0, '', ''],
'URL' => [11, 'alpha', 47, 255, 0, 'http://', '^http://'],
'Volunteer' => [12, 'alpha', 0, 3, 1, 'No', ''],
'Register' => [13, 'alpha', 0, 4, 1, 'Yes', ''],
'SubmitEmail' => [14, 'alpha', 47, 70, 1, '', '.+@.+..+'],
'Date' => [15, 'date', 12, 15, 1, &get_date(), ''],
'YourName' => [16, 'alpha', 40, 70, 1, '', ''],
'Committee' => [17, 'alpha', '40x10', 1000, 1, '', ''],
'userid' => [18, 'alpha', 20, 255, 0, '', '']
);

I also checked the html.pl file and db.cgi file and auth.pl file to make sure all were the same case "userid".

The DbMan is located at http://www.cpphsaa.org/cgi-bin/dbman/db.cgi and is currently open to the public for viewing all records [of which there are currently none].

Password mod is installed. Log View/Edit is installed. They worked fine in testing. Not using autogenerate mod.

A copy of files are called auth.txt html.txt db.txt default.cfg for viewing purposes for debugging.

The db.cgi seems to display using "default" for viewing all records. The logon just does not work.

This is on a unix system. All mods installed were from JPDeni's DBMan-ual or from this forum.

Help...Help...Help.
Quote Reply
Re: [ameigh] Logon userid error -- cannot logon -- can view records using default In reply to
If you add fields to your .cfg file you also have to modify the .db file and add the extra field. If you added it to the end of the file you can just add an extra pipe | to the end of each line.

When you call the script so that users have to login use the url:

http://www.cpphsaa.org/cgi-bin/dbman/db.cgi?db=default

If you want them to automatically enter as a default users you would use:

http://www.cpphsaa.org/cgi-bin/dbman/db.cgi?db=default&uid=default

In either case you should include the name of the db file in te url.

For your login form the start of the form tag is displayed in the page source right after the body tag and not with the actual form to login. And you have another form for your clickgo.pl appearing between that. This is the reason your login form is not displaying the input fields.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Logon userid error -- cannot logon -- can view records using default In reply to
Thanks,

I had just discovered [after starting completely over from scratch and adding new modules once again] that it was my heading. I just did not know why. I had forgotten that the heading had been added last.
Quote Reply
Re: [LoisC] Logon userid error -- cannot logon -- can view records using default In reply to
Moved heading to just under body tag and it works fine now. Thanks.Blush