TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
asa dyo
NA
9
560
multiple login with 3 table (lecturer,student,role) asp c#
May 3 2019 1:32 PM
Hye I have a login form that has
username
and
password
textbox. I also have 2 radio button for 2 role which is
Lecturer
and Student.
For the table in the database, I have S
taff table(Lecturer)
,
Student table
and
Position table(role).
The problem is I don't know how to make when the user enters username and password and choose one role for example lecturer, the username and password will enter the lecturer table and vice versa.
I hope I can get some tips and clues from here and I'm sorry if this question sounds dumb but I don't know what to do anymore.
Here is the interface for login page:
Sql for table Staff
CREATE TABLE [dbo].[Staffs] (
[StaffsID] INT NOT NULL,
[StaffName] NCHAR (10) NOT NULL,
[StaffPw] NCHAR (10) NOT NULL,
[UpdatedBy] NCHAR (10) NULL,
[UpdatedOn] DATETIME NULL,
[PositionID] NCHAR (10) NOT NULL,
PRIMARY KEY CLUSTERED ([StaffsID] ASC),
CONSTRAINT [FK_Staffs_PositionID] FOREIGN KEY ([PositionID]) REFERENCES [dbo].[Positions] ([PositionID])
);
SQL for table student
CREATE TABLE [dbo].[Students] (
[StudID] INT NOT NULL,
[StudName] NCHAR (10) NULL,
[StudPw] NCHAR (10) NULL,
[StudEmail] NCHAR (10) NULL,
[UpdatedOn] DATETIME NULL,
[UpdatedBy] NCHAR (10) NULL,
PRIMARY KEY CLUSTERED ([StudID] ASC)
);
SQL for table position
CREATE TABLE [dbo].[Positions] (
[PositionID] NCHAR (10) NOT NULL,
[PositionName] NCHAR (10) NULL,
PRIMARY KEY CLUSTERED ([PositionID] ASC)
);
Reply
Answers (
1
)
How to find the Average with No LINQ code !
How to create qr code using Xzing library using C#?