close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

insert and update based on user ...?

Thread began 12/27/2012 12:23 pm by jamie.ghio444407 | Last modified 12/27/2012 5:49 pm by jamie.ghio444407 | 604 views | 5 replies

jamie.ghio444407

insert and update based on user ...?

Im building a system for an employment application. The user/applicant will register for a login. (I am using the create double opt in registration tutorial to build the login portion)

1. I created a table to hold references. The columns I used are id(PK), user_id, name, phone, relation, how_long

2. I used DataAssist to create insert and update pages.
a. On the insert page setup I chose to leave out the id as it should be ok to auto increment on its own. I changed the user_id to a hidden field. The other fields I required but not relevant as my question pertains to the user_id and id.
b. On the update page I used both id and user_id to hidden (both fields are included on the page) and the other fields set same as the insert page.

3. The pages are created. Now I need to make sure the pages are looking for the correct values to attach the records to the correct user. I have stopped here to ask for guidance. I think I need to do the following but not sure if I am correct and dont want to have to start over.

a. On the insert page - Click the hidden field and replace the value with the binding "Sesson - SecurityAssist_UserID" - Im thinking this will set that value when the page loads to the sesson value held for the user. Am I correct?
b. On the update page I'd handle my user_id hiddden field the same way as above, but for the id field of the record that was inserted, wouldn't I create a new recordset called getRefID looking for all records in the reference table and filter the data WHERE user_id = "sesson UserID" AND id = url parameter id passed from the previous page (the users view page) and then set the value of my hidden id field to the result of the recordset id column.

This all seems right in my head but since dataassist creates code for me I dont want to remove any before i am sure that i am removing the correct stuff.

Would you do it this way or take another route?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...