I have created one of those change your password forms whereby the the old password and new password are provided.
What I am having trouble with is ensuring that the old password entered actually exists already. Below is what I have tried, but I am getting a syntax error:
Code:
'Check Password
if request.form("CusPassword")<>rsCheckUser.fields("CustomerPassword") then
response.write "Invalid password"
end if
Else
if request.form("CusPassword")= rsCheckUser.fields("CustomerPassword") then
'write new password to databasestrSQL ="UPDATE Customer Set CustomerPassword ='"& NewPassword& "',CustomerPasswordverified ='"& NewPassword& "' where CustomerEmail = '"&CusEmail&"' "
I am trying to create a "Members Only" section of my website. I have an Access Database to store usernames and passwords and I am using Frontpage 2003.
I have very little ASP experience and am having trouble finding some help on this subject that is understandable. I already have a global.asa file on the site because I currently have a page with a form that writes to the database.
What I would like to know is how to setup a login screen to get to the members only side of the site which will validate against the password table in the database.
I have a client who wants to password protect a learning course that is set up in modules. Each module needs to have it's own password protection so users can only access them as they progress through the course.
Each user should have their own password (for each module) and, said client would like the password to expire for the user at some (predetermined?) point. Is this possible? It seems like a lot (in terms of setup), but I don't know much about password stuff.
If it is possible, can someone give me an overview of how it works (theoretically) or where to find more specific info on setting something like this up (in ASP.net)
If it isn't possible, can someone suggest what is more reasonable in terms of protecting the modules?
I created sessions to authenticate username and password. How can I utilize this same script to alert the user to change password at 3rd login? In other words when a user logs into a site after the 3 or 4th time which ever, they are prompted to change their password. Code:
I have a date entry on a form that must be at least 30 days from the current date. It is a delivery request date and the soonest it can be processed is 30 days from the request. I need code to validate and message should they enter a date less than 30 days from the current date.
I've been given a task to write an function to validate URL's used on a website. The URL's are going to be kept in a table with other fields to indicate if the URL is valid and when it was last validated.
Any URL's that aren't valid won't be displayed on the site. Is there a way in ASP to check if any given URL returns a 404 error?
I have a form which consists of a few fields. The problem that i encountered was it seemed like just checking the first field only rather than all the fields. Code:
I am looking for a way to do a validation in the form that who ever is filling the form is a true person & not a automatic system. there is a way to do it with letters in an image & the user must enter the same letters in a text field.
I am wondering if there is a way to validate a user's login from 2 different tables. Currently I have a sql string that pull info from a table based on the users login and password.Code:
sqlStr = "Select * From authorised_user_table where username = '" & Request.Form("username") & "' and password = '" & Request.Form("password") & "'"
My problem is I the passwords in this table are old, and I have a new table with all new passwords (same structure, just different passwords). I'm thinking most of the users don't remember their new passwords just the old. So is there a way I can query both tables? Something like Select * from table1..... else Select * from table2
I once saw somewhere, and I cannot recall the site / article... But I believe there is a way that you can "Check" an E-Mail Address to make sure that it is a Valid Email Address. NOT Syntax checking... But to actually determine if the email address typed in is a "Real" and "Active" E-Mail Address.
I realize this is not solely an ASP question, but I thought you guys might know the answer and I couldn't find anywhere else to post this. If you have suggestions for this I am more than happy to post somewhere else.
How can I, using ASP code, validate whether or not an email address is a real one? For example, if I have the email address called Join Bytes! how can I determine if it is real?
A form is passing "firstName" and "lastName" to your ASP page.show code how to validate them server side validation as follows:Only Alphanumeric characters,commas,hypens, spaces or periods are allowed in the last name.
Only A-Z, the hyphen are allowed in the first name.Both fields must be provided.Return a string value from your validation indicating to the user what is wrong with their entry. "
I am using this code to validat a checkbox in a very big file, the problem is,its not validating:
here is my code function checkAgree(theform){ if(theform.Agreement.checked == false){ alert("Please tick the checkbox to continue."); theform.Agreement.focus(); return false; } }
I have 2 fields on a form called 'name' and 'title'.
I want to make the 'name' field compulsory to fill in on a form. So if someone submits a form and the name field is not filled in, it will tell them and won't let them submit.
But I only want the name field to become compulsory when the 'title' field is filled in. So if the title filed is blank then the validation will not be effective but if the title field is filled in then the name field will become compulsory. Code:
I just realized that it's so important to validate each string, I mean 'each' before you insert data from asp page into database.
I guess some customers just copy data from some electronic document and paste intoform field which it will probably mess up the program.
for example, we have a customer who wants to enter AH12345 into one of our fields, it appears Ð?Ð?12345 in hidden field of our asp page, but it displayed AH12345 to the customer, but our program failed because of the data does fit into char field in sql database.
I don't know in reality, how other companies deal with those kind of thing. Do I have write our own regExp to validate each string, since we do need to allow apostrophe or "-" in first name or last name.
I have functions with which i can validate a URL from serverside. But, i need to valide the URL at the Client side (ASP- Javascript) itself. Is there any way to validate a given URL from the Client side.
I have a form that users fill in, thefirst field is a username, which must be unique.Currently only when I attempt the Insert into the DB does the restaint inform the user that it already exists.Is there any way i can check , let say onblur, if that username exists, so that they dont have to complete the whole form before being informed?
Function chkEmail(sEmail) Set objRegExp = New RegExp searchStr = "^[w-.]{1,}@([da-zA-Z-]{1,}.){1,}[da-zA-Z-]{2,3}$" objRegExp.Pattern = searchStr objRegExp.IgnoreCase = true chkEmail = objRegExp.Test(sEmail) End Function
I am developing an application ASP and desire to validate the fields of dates before jumping to consultation SQL, the dates is entered text boxes and the idea is that been worth when losing the Focus. How I can do that?
I have a text box within a form that allows for Codes to be inputted.What i want is for an error message to be displayed and the form to be prevented from being submitted, if the code length inputted is less than 14 characters.I'm using dreamweaver and i have already set the text box to restrict the maximum character length to 14 characters, but there does not appear to be a mimumum character delimiter option available.
is there anyway that I can validate my date format in asp?? I have tried like date=now(), that gives me like 5/14/2004, the format should be mmddyy, no space,no dash,and has to include 0 if month is from 1-9, for example 01, 02, like that?