Gossamer Forum
Home : Products : DBMan : Installation :

Don't know the variables

Quote Reply
Don't know the variables
Please help...

I do not know the variables for instance in the html.pl file, I want to have a drop down menu, radio buttons, etc...

But from what I unstand is that I have to have a special variable for that, or don't I?

Thanks

David

Ps. I also kleep getting this error:

DBMan encountered an internal error.

CGI ERROR
==========================================
Error Message : Debug Information
Script Location : /usr/local/etc/httpd/htdocs/special-guests/cgi-bin/database/db.cgi
Perl Version : 5.00502
Setup File : default.cfg
User ID : admin
Session ID : admin.99757898739147

Form Variables
-------------------------------------------
db : default
uid : admin.99757898739147

Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /usr/local/etc/httpd/htdocs/special-guests
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/jpeg, image/pjpeg, application/msword, application/vnd.hp-hpid.vF3.1.0.198, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : special-guests.com
HTTP_REFERER : http://special-guests.com/spcgi/database/db.cgi
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
PATH : /bin:/usr/bin
QUERY_STRING : db=default&uid=admin.99757898739147
REMOTE_ADDR : 216.120.182.226
REMOTE_HOST : cisco-1-226.riverview.net
REMOTE_PORT : 4241
REQUEST_METHOD : GET
REQUEST_URI : /spcgi/database/db.cgi?db=default&uid=admin.99757898739147
SCRIPT_FILENAME : /usr/local/etc/httpd/htdocs/special-guests/cgi-bin/database/db.cgi
SCRIPT_NAME : /spcgi/database/db.cgi
SERVER_ADMIN : msdesign@msdesigns.com
SERVER_NAME : special-guests.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.4 (Unix) PHP/4.0.3pl1

Quote Reply
Re: Don't know the variables In reply to
Maybe you're html.pl has an error in it. Dbman likes to drop strange undefined errors every once in a while and normally they are related to html mistakes.

ummm ... try the readme and LoisC's unoffical dbman faq for more information on drop downs, buttons, and radios.

you can do things like this:

|; print &build_checkbox_field ("yahoo", "$rec{'yahoo'}");
print qq|

If you check the db.cgi there are functions that will build each of those html objects.

good luck




**************************************
on the pages in between ...
Quote Reply
Re: Don't know the variables In reply to
Hey,

There is onthing I don't understand:

"If you check the db.cgi there are functions that will build each of those html objects."?

How can I do that what stuff do I change?

Thanks

David


Quote Reply
Re: Don't know the variables In reply to
ummm ... I'm not a perl guru just a GT junkie.
You could try using my code above as an example. change out the word checkbox for select or radio. don't forget that you need to change the variable "yahoo" I used above with something more appropriate.

Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);

# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );


these are from the default.cfg ... if you add new fields then you have to add them to whatever html object that you're using. checkbox, select, or radio.

You can also check out LoisC's unoffical faq since she's gone into much better detail on the different variations there are. like the build_select_field_from_db which calls fields straight from the db and there's JPDeni's multi_select mod.

I'm sorry that I don't have those links off-hand but at least they're easy enough to find.

Good luck

**************************************
on the pages in between ...
Quote Reply
Re: Don't know the variables In reply to
webwizzz:

You may want to check our JPDeni's excellent DBMan tutorial.
http://jpdeni.com/dbman

She has a configurator which you can use to easily setup your database. The results will provide you with the settings for your .cfg file and also the page layouts.

Then you can just easily modify what is given to get the look and feel for your individual site.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/