I'm new to databasing too, and decided to put this question off till I got the basics down first.
My beginners solution was to put the database info in a txt file in my cgi-bin and read the variables into the script. I also set the variables for the info with this code, which I read hides the text on the server side: $pkg::dwd = "";#FOR -w $pkg::dnm = ""; $pkg::dun = ""; require "../lib/confvars.pl"; local $ENV{'DBI_DRIVER'} = "mysql"; local $ENV{'DBI_DSN'} = $pkg::dnm; local $ENV{'DBI_USER'} = $pkg::dun; local $ENV{'DBI_PASS'} = $pkg::dwd; The files that only read the database and available to the public are in unprotected directories without htaccess files. Then use apache htaccess files to protect the directory that has scripts which change the database. I would like to learn about allowing only certain scripts access. If anyone has a tutorial.