|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
password validation
Anyone have server side code to password validation?
__________________
atferraz |
|
#2
|
||||
|
||||
|
search at http://www.hotscripts.com
|
|
#3
|
||||
|
||||
|
Short n Sweet, have 2 form elements, one called txtUsername and the other txtPassword. Set up the page to POST to itself upon submit.
At the top of the page, code this: Code:
<%
If Request.ServerVaraibles("CONTENT_LENGTH") > 0 Then
tmpUN = Request.Form("txtUsername")
tmpPW = Request.Form("txtPassword")
If (tmpUN = "validName") AND (tmpPW = "validPass") Then
Session("loggedIn") = "yes"
Response.Redirect("login.asp")
End If
End If
%>
And on all other pages, you just gotta do a check to make sure that session value is set, otherwise the user got there without supplying a valid un/pw Code:
<%
If Session("loggedIn") <> "yes" then
Response.Redirect("login.asp")
End If
%>
|
|
#4
|
|||
|
|||
|
thanks aaron.martone, but what I want is to check the userName and password for characters like "<select * from..., "*+/\|#$%&()=?>", etc.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > password validation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|