I am using DB SQL v. 1.02 and have used the user signup form to gather additional info like address and phone. I created the proper fields in the Items_users table of my db and added the correct inputs to the sub html_signup form. But when the form is submitted, only the username and password is collected.
So then I went to the sub signup in db.cgi, and altered the following code:
if ($sth->rows) {
$message = "Username $username_q already exists. Please try another.";
}
else {
$query = qq!
INSERT INTO $db_table_user (username, password, per_view, per_add, per_del, per_mod, per_admin)
VALUES ($username_q, $password_q, $permission)
!;
$DBH->do ($query) or ($message = "Username $username_q already exists. Please try another.");
}
$sth->finish;
$message ?
&html_signup_form ($message) :
&html_signup_success();
}
and changed it to:
if ($sth->rows) {
$message = "Username $username_q already exists. Please try another.";
}
else {
$query = qq!
INSERT INTO $db_table_user (username, password, per_view, per_add, per_del, per_mod, per_admin,user_real_name, company, company_url, job_title, user_address, user_city, user_state, user_zip, user_phone, user_fax, user_email)
VALUES ($username_q, $password_q, $permission, $user_real_name, $company, $company_url, $job_title, $user_address, $user_city, $user_state, $user_zip, $user_phone, $user_fax, $user_email)
!;
$DBH->do ($query) or ($message = "Username $username_q already exists. Please try another.");
}
$sth->finish;
$message ?
&html_signup_form ($message) :
&html_signup_success();
}
But now, I get and error that the username already exists. Your help is appreciated. Thanks!
So then I went to the sub signup in db.cgi, and altered the following code:
if ($sth->rows) {
$message = "Username $username_q already exists. Please try another.";
}
else {
$query = qq!
INSERT INTO $db_table_user (username, password, per_view, per_add, per_del, per_mod, per_admin)
VALUES ($username_q, $password_q, $permission)
!;
$DBH->do ($query) or ($message = "Username $username_q already exists. Please try another.");
}
$sth->finish;
$message ?
&html_signup_form ($message) :
&html_signup_success();
}
and changed it to:
if ($sth->rows) {
$message = "Username $username_q already exists. Please try another.";
}
else {
$query = qq!
INSERT INTO $db_table_user (username, password, per_view, per_add, per_del, per_mod, per_admin,user_real_name, company, company_url, job_title, user_address, user_city, user_state, user_zip, user_phone, user_fax, user_email)
VALUES ($username_q, $password_q, $permission, $user_real_name, $company, $company_url, $job_title, $user_address, $user_city, $user_state, $user_zip, $user_phone, $user_fax, $user_email)
!;
$DBH->do ($query) or ($message = "Username $username_q already exists. Please try another.");
}
$sth->finish;
$message ?
&html_signup_form ($message) :
&html_signup_success();
}
But now, I get and error that the username already exists. Your help is appreciated. Thanks!