Download
project phase ii n.
Skip this Video
Loading SlideShow in 5 Seconds..
Project Phase II PowerPoint Presentation
Download Presentation
Project Phase II

Project Phase II

241 Views Download Presentation
Download Presentation

Project Phase II

- - - - - - - - - - - - - - - - - - - - - - - - - - - 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#?