RFID attendance system - coding problem

I am creating an attendance system for students using RFID RC522 and an Arduino Uno. When a student scans their personal ID card, I want to display their personal student ID number on to an LCD screen.

For example, if Student A, with ID: A1234567, scans their card, which has a hex UID of '3B 4C 65 2D'. I want to display the student ID, 'A1234567' and not the hex UID.

When I scan a card at the minute I am displaying the UID of the card and not the desired student ID. I am not sure how to link these values together.

I have attached the code that I am using.

All replies are welcome. Thank you!

Attendance.ino (2.77 KB)

When I scan a card at the minute I am displaying the UID of the card and not the desired student ID. I am not sure how to link these values together.

The simplest thing to do is to stop using one if statement to determine if the scanned card is a student card.

  if(content.substring(1) == b4019873)
  {
      // Joe scanned his card
  }
  else if(content.substring(1) == b0123456)
  {
     // Bob scanned his card
  }
  else if(content.substring(1) == b1234567)
  {
     // Adrian scanned his card
  }