1 / 9

Project Phase II

Project Phase II. Login New User Email UserName with Password Before Class Thursday. Login. Public Function Login( ByVal UserName As String, ByVal Password As String ) As String Return Value:

RexAlvis
Download Presentation

Project Phase II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project Phase II Login New User Email UserName with Password Before Class Thursday

  2. Login Public Function Login( ByVal UserName As String, ByVal Password As String ) As String Return Value: “Admin” : Found admin in database “User” : Found user in database “NotFound” : Not found in database

  3. Badger One/Two Dim UserName, Password, Role As String ‘ Check input to get UserName and Password ‘ Role = Login( UserName, Password ) Role = UserName If Role = “Admin” Then ‘ Accessing all pages Else If Role = “User” Then ‘ Accessing user pages only Else ‘ Error message ‘ Cannot access any pages End If

  4. New User Public Function NewUser( ByVal UserName As String, ByVal Password As String, ByVal FirstName As String, ByVal LastName As String, ByVal Email As String ) As String Return Value: “ExistingUser” : Same UserName found in database “ExistingEmail”: Same Email found in database, optional “UserCreated”: New user created “Sorry” : Database down?

  5. Badger One/Two ‘ Check input to get UserName, Password, FirstName, LastName, Email UserName 6 – 10 Letters, Digits, _ Case sensitive: yes to save, no to compare Password 6 - 20 Any chars, no: ‘ ‘ “ “ , . [ ] { } ( ) $ & SPACE ! Case sensitive: yes

  6. Badger One/Two ‘ Check input to get UserName, Password, FirstName, LastName, Email Dim Result As String ‘ Result = NewUser(UserName, Password, FirstName, LastName, Email) Result = UserName If Result = “ExistingUser” Then ‘ Error message Else If Result = “ExistingEmail” Then ‘ Send username and password Else If Result = “UserCreated” Then ‘ Go to user pages Else ‘ Come back later End If

  7. Email UserName with Password Public Sub GetUser (ByVal Email As String, ByRef UserName As String, ByRef Password As String ) If not found, set UserName and Password to “”

  8. Badger One/Two ‘ Check input to get Email Dim UserName, Password As String GetUser (Email, UserName, Password) If UserName <> “” and Password <> “” Then Send email Else ‘ Email not found

  9. Badger One/Two Ajax Java Script VB or C#?

More Related