You said in your fist post:
QUOTE
"2. Error checking to make sure the right information is in inputed."
In your next post you said:
QUOTE
"First off the input I want to make sure is inputed is the user name and password as well as the home dir. these would be required fields. As you can see from my code I have tried to do this I believe this is working but wanted to make sure of the syntax and maybe there is an easier way of doing this."
Your code is only checking that the required form fields are not empty. That is the most basic type of user input validation you can do. If that is all you want to do then your code is OK. But the user could enter all spaces or some other useless (or dangerous) information in the form field and your script will accpet it and try and process it. The first rule of CGi programming is:
Never trust user inputthe second rule is:
Treat user input like poisonthe third rule is:
All user input is badthe forth rule is...... I think you get the picture by now

You must validate all input from a form. If you only expect numbers from a form field make sure there are no non-numbers:
CODE
if (/\D/) {
"danger danger!"
}
this also applies to your hidden form fields. Think about what the input should be then write some regexps that validate the expected input. Reject anything that is unexpected. Validating the directory is especially important. You don't want the user entering the name/path of just any directory otherwise you will be hacked in no time by a malicious user. (Damned those users anyway!)

As far as naming your form fileds, drop the "$" in the names, thats all you need to do. If you have:
CODE
<input type="text" name="$User">
change it to:
CODE
<input type="text" name="User">
in your perl code remove the "$" in the names:
CODE
print $cgi->textfield('User','');
my $user = $cgi->param('User');
Don't use the '-w' switch on the shebang line
CODE
#!/usr/bin/perl -wT
use the warnings pragma instead:
CODE
#!/usr/bin/perl -T
use warnings;
This is much more flexible. You can then use:
CODE
no warnings;
in your code to turn off warnings in blocks of code where the warnings are a nuisance instead of any real value to help debug code or alert you to potential problems.
QUOTE
For the letting admin know it was successfull A normal html page that has checked to see if the ftp user has been entered into the database.
Then you have to write an html file and add the information the admin wants to see:
user Joe Blow was addedd succesfully on August, 25th, 2007 at 12:00or whatever is appropriate. But there are a few ways you could go about doing something like this. Writing an html page is easy but not very flexible or scalable for future revisions.
QUOTE
With checking if the ftp user is in the database I know you should count the rows or something like that to see if the user is already in the database, just not sure of the code.
Unfortunately, I am so rusty with database stuff I can't help you there. Counting rows does not sound like the way to go though. Hopefully someone else will read this thread and have a suggestion.
This post has been edited by KevinADC: 26 Aug, 2007 - 12:39 PM