Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [timbo] Adding member record after signup

Quote Reply
Re: [timbo] Adding member record after signup In reply to
Hello.

To do this, have an important field (for example email, which you know they will fill out when they add their details) empty. Then, in your templates, add an if statement

<%unless admin_p%>

<%if companyemail%><a href=db.cgi?db=<%db%>&do=modify_form>Modify Company Details</a><%else%>

<a href=db.cgi?db=<%db%>&do=modify_form>Add your company's details</a><%endif%> <%endif%>

<%if admin_p%><a href=db.cgi?db=<%db%>&do=add_form>Add new company</a> | <a href=modifylink.html>Modify this company's details</a>

<%endif%>

Now, this will check if your field has data for those that are not admin, and will either display the add or modify options, while to an admin, both options will be seen. (Note: if youre using the same modify form for both add details and modify details, you dont have to worry about the admin thing... it will be the same. However, this way, you can have the admin able to add a new company and have another template called "new" for example, where you modify the "modify_form.html" file found in your default template set (copy and paste the whole template set, rename the new set as "new", then modify "modify_form.html" on the "new" template set. Once this is set up, you could have newcomers (those that havent added their details) shown a "Welcome to my site! Please add your company details" add details form, while those returning (just modifying) would be shown a "thank you for updating your information" page. This can be done by adding "&t=new" to the "db.cgi?db=<%db%>&do=modify_form&t=new> on the add details link.

Hope this answers your question. Thats the way I would do it.
Subject Author Views Date
Thread Adding member record after signup timbo 3369 Sep 3, 2003, 3:02 AM
Post Re: [timbo] Adding member record after signup
ecamty 3228 Sep 3, 2003, 10:52 AM