Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:19:33+00:00 2026-05-28T07:19:33+00:00

I am doing a project for school, and I am new to php and

  • 0

I am doing a project for school, and I am new to php and mysql.

I have to create one loginpage with 3 different users like corres, principal and the staff

In the table field what type I have to give like ENUM or SET?
I want to assign 0 for corres,1 for principal and 3 for staff.

How to do this, and should I give any field in the login page in php?

But I am going to create only 2 tables one for corres and other one is for staff

correc table fields are

corrs_id,username,password,staff_id,staff_role

staff table fields are
staff_id,staff_role,name,qualification,address,state etc.

Both the tables have 2 common fields staff_id and staff_role.
Now how to connect 2 tables, and when username and password is given it should first check the staff_role like principal or a staff using staff_id from the corres table according to tht the page should open.

Please help me in this project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:19:33+00:00Added an answer on May 28, 2026 at 7:19 am

    Put all the fields in the same table and add another field like staff_role (Tree structure).
    and based on the value returned from this field redirect to the particular page.

    Say table has these data
    employee_id emp_name password emp_role
    and data like
    3 Jack password staff
    Algorithm

    $emp_role= $record['emp_role'];
    
      if($emp_role == "principle")
     Header("location: principle.php");
    else if($emp_role == "staff")
    Header("location: staff.php");
    else if($emp_role == "corres")
    Header("location: corres.php");
    else
    Header("location:StaffRoleNotDefined.php");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I'm really new to php/mysql. I'm working on a php/mysql school project with
Hello I am in the process of doing a school project, where we have
I am doing a school project regarding a small website that uses php. I
I'm doing this project for school and for some reason one of by Buttons
Hi i am currently doing a school project using cakePHP. I have the following
I'm doing a grad-school software engineering project and I'm looking for the protocol that
I am doing project euler question 33 and have divised a refactor to solve
I'm doing a project in seam that requires restful URLs. I have a view
I'm doing a school project about maintaining a personal Database. but my tutors didn't
I m doing project in opencv... i m getting error like this Unhandled exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.