January 31, 200223 yr This is kind of convoluted.... bear with me. I've got a database that essentially has user names and passwords. (They're not real, so the security is not a problem.) Anyway, records will be entered into this database exclusively via the web. This allows me to populate two fields at once. What I want to do is force the password to equal something specific based on the user name, since they're getting submitted at once. I want to prevent people from being able to create a record with X username but Y password. They can only create a record with X username and X password. The username and password values are predefined. For every username that exists, there is one unique password. All of these passwords live in a value list. I can force the password field to be a member of that value list, which will prevent folks from entering an invalid password. But they can still enter their username with someone else's password. Get it? (The actual online process will be a record created by a URL. The URL will include both the user name and the password. I don't want people to be able to change the fields in the URL and successfully create new records.) Any ideas? Sorry it's confusing... TIA, Carrie
January 31, 200223 yr This may be a silly question, but... Any reason why the Password field can't be a calc field?
January 31, 200223 yr Concatenate the username and password in both the database and the URL. Make a value list based on the combined field. Force the submitted value to be a member of this list.
January 31, 200223 yr Author How can I concatenate in the URL? I guess I could do it in my perl script.... that's a maybe. Is there any other way ?
February 1, 200223 yr Author I suppose it could, but it would be pretty nasty. The user names are a max of 8 characters - first and middle initial, and first 6 letters of last name. The password field is a 12 character randomly generated string. In order to use a calculation, I'd have to say if username=x and password=x okay, otherwise not okay. I'm not even sure how to set that up. Right now there are about 20 entries that would have to be in that if statement. And it doesn't make for very easy updating as there are more.
February 1, 200223 yr Depends on how you are creating the URLs. How does a user enter the username and password from the web page? If you use a form, then you can ask for the name and password in two identical text fields: <p>Name: <input type="text" name="namePass" value="" size="40"></p> <p>Password: <input type="password" name="namePass" value="" size="40"></p> The two values will wind up in the namePass field with a return between them. In your name and password file, create a field, namePassCalc, like this: namePassCalc(calc,text) = name & "@" & password In the file where you will create records, make a NamePass value list that takes values from the namePassCalc field. Make namePass validated by calculation: Position("
Create an account or sign in to comment