Gossamer Forum
Home : Products : DBMan SQL : Discussion :

additional info on signup form (Items_users table)

Quote Reply
additional info on signup form (Items_users table)
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!
Subject Author Views Date
Thread additional info on signup form (Items_users table) Explosivo 2362 Oct 10, 2001, 3:36 PM
Thread Re: [Explosivo] additional info on signup form (Items_users table)
604 2258 Oct 11, 2001, 12:21 PM
Post Re: [TheStone] additional info on signup form (Items_users table)
Explosivo 2237 Oct 12, 2001, 9:16 AM