<% '************************************************************************* ' ASP Scripting: ' Filename: library_user_data_validation_functions.asp ' Written by: Wilbert Madarang ' Date: March 16, 2003 '************************************************************************* ' Description: This function consists of a series of functions for ' performing user data validation. '************************************************************************* %> <% '************************************************************** ' FUNCTION: parseData ' DESCRIPTION: Parses information MemberShip Information ' PARAMETERS: none ' RETURNS: none '************************************************************** ' SIDE-EFFECTS: Local Variables are Populated '************************************************************** Function parseData() 'UserId 'strUserId = Request( "userId" ) 'Parse Data 'strEmail = Request("email") 'strFirstname = Request( "firstname" ) 'strLastname = Request( "lastname" ) 'strConfirmEmail = Request( "confirm_email" ) 'strPassword = Request( "password" ) 'strConfirmPassword = Request( "confirm_password" ) 'strSecretPhrase = Request( "secret_phrase" ) 'strSecretPhraseHint = Request( "secret_phrase_hint" ) 'Address strAddress = Request( "address" ) strCity = Request( "city" ) strProvince = Request( "province" ) strPostalCode = Request( "postal_code" ) strCountry = Request( "country" ) End Function '************************************************************** ' FUNCTION: isAllRequiredDataAvailable ' DESCRIPTION: Checks if All Required Data Available ' PARAMETERS: none ' RETURNS: returns Fail '************************************************************** ' SIDE-EFFECTS: Local Variables are Populated '************************************************************** Function isAllRequiredDataAvailable() bReturn = true If IsNull( LEN(strAddress) ) OR LEN(strAddress) = 0 Then bReturn = false Elseif IsNull( LEN(strCity) ) OR LEN(strCity) = 0 Then bReturn = false Elseif IsNull( LEN(strProvince) ) OR LEN(strProvince) = 0 Then bReturn = false Elseif IsNull( LEN(strPostalCode) ) OR LEN(strPostalCode) = 0 Then bReturn = false Elseif IsNull( LEN(strCountry) ) OR LEN(strCountry) = 0 Then bReturn = false End If isAllRequiredDataAvailable = bReturn End Function '************************************************************** ' FUNCTION: printUserData ' DESCRIPTION: prints User Data ' PARAMETERS: none ' RETURNS: none '************************************************************** Function printUserData Response.Write "

Printing User Data


" & vbCrLf Response.Write "strUserId is " & strUserId & "
" & vbCrLf Response.Write "strEmail is " & strEmail & "
" & vbCrLf Response.Write "strFirstname is " & strFirstname & "
" & vbCrLf Response.Write "strLastname is " & strLastname & "
" & vbCrLf Response.Write "strConfirmEmail is " & strConfirmEmail & "
" & vbCrLf Response.Write "strPassword is " & strPassword & "
" & vbCrLf Response.Write "strConfirmPassword is " & strConfirmPassword & "
" & vbCrLf Response.Write "strSecretPhrase is " & strSecretPhrase & "
" & vbCrLf Response.Write "strSecretPhraseHint is " & strSecretPhraseHint & "
" & vbCrLf Response.Write "strAddress is " & strAddress & "
" & vbCrLf Response.Write "strCity is " & strCity & "
" & vbCrLf Response.Write "strProvince is " & strProvince & "
" & vbCrLf Response.Write "strPostalCode is " & strPostalCode & "
" & vbCrLf Response.Write "strCountry is " & strCountry & "
" & vbCrLf End Function %>