Gossamer Forum
Home : Products : DBMan : Customization :

Add Record - Save In 2 Databases

Quote Reply
Add Record - Save In 2 Databases
I've searched and searched and... Well, I ran across one thing that looks like it's what I need, but I'm confused as to where to put the code. I found this old post from May '99, http://webmagic.hypermart.net/dbman/file4.txt, which says to insert this code, then that, then another. But it isn't clear to me WHERE to insert all this code.

I found http://webmagic.hypermart.net/dbman/file4.txt but it confused me.

Hopefully someone can help me. This is what I'm trying to do...

I have three .db & .pl combinations that use the same db.cgi and such:
db1 = 24 fields (kind of a user/bio thing)
db2 = 1 field
db3 = signup only

db1 keys on a unique ID .count number.
db2 keys on a concatenated field [ID from db1]:statictext:statictext
db3 ONLY does signup, with ID passed on the URL as the userid.

db3 does nothing but allow the user to create a password (the ID is passed on the URL as a variable so the pword.pl only presents a signup screen requesting password). This has to occur last, since, a) I don't want the kids just randomly signing up for user accounts until AFTER they've entered a record, and, b) after signup signup_success can't pass the userid back out to another db (right?).

I'm dealing with kids, so I want the process to be as easy for the user as possible--in other words, I really need as much as possible to go on behind the scenes without the user having to remember or re-enter info.

Ideally the kids would enter db1's add_record with no authentication (but key_track = ID), fill and submit the record. Add_Success then...
1. shows a summary (y'know "this is what you wrote")
2. writes [ID from db1]:statictext:statictext invisbly to db2
3. contains a link that says "click here to proceed", which takes them to db3 signup (passes the ID field on the url as the userID) and where they enter a password and signup.

How can I do this?

Also, is there a way to print the userID on the signup form? I've tried normal $rec('userid') and it stays invisible (though it writes into the hidden field ok).

Thanks in advance for your help!

Quote Reply
Re: Add Record - Save In 2 Databases In reply to
The helpful responses have been overwhelming. I'm not sure I can read all of them.

Maybe I'm go about this the wrong way. JPDeni, help??

Quote Reply
Re: Add Record - Save In 2 Databases In reply to
Oh well. I figured out a workaround that does exactly what I need. Not as elegantly, mind you, as I had wanted, but it works.