Gossamer Forum
Home : Products : DBMan SQL : Discussion :

many forms...many tables

Quote Reply
many forms...many tables
Greetings, again and thank you for responding my last question.

I have one more and I should be on my way.

I'm trying to set up a "dating" web site.
The database will have 3 tables:

1) members (basic registration info, such as name, city,b-day). Members will have permission to add + modify their info, but not delete.

2) members_profile (genter,hobbies, etc). Members will have permission to add + modify their info, but not delete.

3) members_interview (more private questions, etc).Members will have permission to add/modify/delete.

I can surely write different input forms for each table and I Know how to retrieve and search info from each one. My question is how can I:

1) Direct the user to add a profile at "members_profiles" afte filling up their registration fields at "members"

2) Add a button to allow them to add/delete/modify their "members_private" table.

I tried to use the multiform mod from JPDeni, but to tell you the truth, I don't know where to begin to implement that to the DBSQL (I'm using Beta 2).

ANY feedback will be more than appreciated
Thanks again :)

Quote Reply
Re: many forms...many tables In reply to
Hi,

1) Direct the user to add a profile at "members_profiles" afte filling up their

registration fields at "members"?????

>> You can change "signup" subroutine in Home.pm like that

sub signup {
...................
...................

# Print the welcome screen.
return $self->login();
# return $self->login_form($self->_language('MSG_SIGNUP_SUCC', $username ));
}

2) Add a button to allow them to add/delete/modify their "members_private" table.???

>> First of all, you have to create a user field for tables that you wanna add/delete/modify their's own records. After that, you must be setup the auth_user_field in admin site.

Ex: members_interview table
- Create a userid field that is auth_user_field.
- You have to add a hidden input <input name='userid' type=hidden value='<%user_name%>'> in add_form.html, modify_search_form.html, delete_search_form.html.

It will be add/modify/delete their's own records.

Cheers.

Quote Reply
Re: many forms...many tables In reply to
Thanks 911 :)

But I have a question for you...I was working on this hack (which could also make the job a lot easier, if it worked).

I combined the "members_interview" table with "members_preferences". So, technically, all the person has to do is to sign up and fill in the table.

What I did was I added my "registration fields" (location, city, etc) DIRECTLY into the "members_users" table. That way, when they "sign-up" ,they are not just adding a username + password. They are actually populating that table.

The problem is that when I change the sign up form + the admin table_users, it does not reflect the populated fields, neither it allows me to populate them via the form.

Do you know if there are any restrictions to changing a "users" table?

Thanks again!