Structure for inserting data through a validated 2 field login
I'm sorry to keep pestering you but I'm working on a new page now that I'm having trouble with, it's actually turning out much more complicated than I thought. Thus, the new thread because this is a new subject. I want to first see if I'm going about this the right way. First here's a description of what I'm trying to do.
I have a 2-field entry form, one is the email address and the other is the password. I've also got several hidden fields that I'm using to pass data from an existing database to the database on the insert behavior on this page. I'm doing it this way because this is a sweepstakes entry form so I don't want the visitor to have to fill out all the contact information fields every time. That information is already in a database that came from the sweeps registration form so it makes sense to use it and pass it through the hidden fields.
Here's the method that I've been trying:
One for pulling the data from the existing registration database named rs_sweeps_members_entered
One for storing the data from that table along with some new columns added named rs_sweeps_entries This is the one that has the insert server behavior on it.
One for validating that the e-mail address is in the registration database named rs_emailLookup_members
You'll see another one called rs_sweeps_catalogs but it's not a concern, it's being used for a repeating region on the page.
I've moved all of the recordsets to just below the header connections and all are testing fine.
I've added a session variable but this is one that I'm not sure that I need so please let me know. As long as the password validates as being found in the database then maybe that's all I need????
I've added the same email validation that I used on the track_sanction_registration page that you helped me with the past few days. That was the one using $totalRows_<?> with a numeric setting of -1 and 0 but I'm not sure if those settings should change for this application.
I've added the "show If" behavior on the e-mail field too but again I'm wondering about the settings on that. Currently I have it set to fail on $totalRows_rs_emailLookup_members but with this code it doesn't fail, it lets the insert go ahead whether the e-mail is validated or not. I have had this validation error displaying correctly at times in different coding attempts but it's not working with this current code.
When the data is inserted it just takes the first row of the sweeps_registration table in the rs_sweeps_members_entered recordset and inserts it into the new table on the rs_sweeps_entries recordset. It doesn't search for the row associated with the email address that was entered.
I'm sorry for he long post but I figured the more info the better. I've tried building this one element at a time but it seems that everything is so tied together that you about have to have all the behaviors there at once to really test it.
I've attached the code but please let me know if you need any more info.
Once again thanks in Advance, you guys have been lifesavers on this.