[ic] inserting into userdb table through a form

Bill Carr interchange-users@icdevgroup.org
Fri Jul 12 07:04:03 2002


On Fri, 2002-07-12 at 00:10, Brent Kelly wrote:
> Hey all,
> 
> I'm trying to modify the 'new account' page so that the user must specify 
> their name, company, and misc other details at the same time to create a new 
> account. Now i've tried this a number of ways and read all the docs i can get 
> my hands on (the written manuals, and on the web) but still can't figure how 
> to get this going.
> 
> According to an example in the written manuals (IC 4.8 Development Guide - 
> p.248) the following code should be able to insert into a table on submit:
> 
> <FORM ACTION="[process secure=1]" METHOD="POST" name="account">
> [set mv_data_enable]1[/set]
> <INPUT TYPE="hidden" NAME="mv_session_id" VALUE="[data session id]">
> <INPUT TYPE="hidden" NAME="mv_data_table" VALUE="userdb">
> <INPUT TYPE="hidden" NAME="mv_data_key" VALUE="username">
> <INPUT TYPE="hidden" NAME="mv_data_function" VALUE="insert">
> <INPUT TYPE="hidden" NAME="mv_nextpage" VALUE="login">
> <INPUT TYPE="hidden" NAME="mv_data_fields" 
> VALUE="title,username,password,company,fname,lname,address1,address2,city,state,zip,country,email,phone_day,visitor">
> 
> ..... and then all of the form input variables for each field as specified in 
> mv_data_fields (e.g. <input type="text" name="company" value="">).
> 
> now i know theres prolly something obvious that i'm missing but the above code 
> still doesn't insert a row on submit. What i'm trying to achieve is basically 
> the standard new account page, just with the added fields.
> 
> Could someone please point me in the right direction, or in the direction of 
> some docs that would.
> 
> Cheer heaps for any help,
I think you need to add
<INPUT TYPE="hidden" NAME="mv_todo" VALUE="set">

You could also use the userdb new_account function. Call it into action
via mv_click=NewAccount. That way you will get some checks like password
eq verify. Use a mv_form_profile to check your required fields. I think
you might have to do a userdb save after creating the new account but I
am not sure.

I just did this so I will post the page if you want it.

> 
> Brent Kelly,
> Zeald Ltd.
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 
-- 
Bill Carr
Worldwide Impact
bill@worldwideimpact.com
413-253-6700