Periodic Table project script problem

I’m working through the Periodic Table database project. The task is to write a script that takes an argument of either atomic number, symbol, or element name. The script will scrape the database and return information about the element in question.

I’ve separated the script into 3 main if statements regarding the argument passed to the script. I have atomic number, and symbol arguments working very well. However, I can’t figure out why I can’t get the element name argument to work correctly.

I’ve attempted to craft the if statement to read the argument, if the argument does not match the element name I want to print a ‘not found’ sentence. The problem I’m encountering now with the script as is, is the ‘not found’ sentence’ prints in either scenario.

For example, if I run the script and pass the argument Hydrogen…the response is “I could not find that element in the database.” If I pass the argument XXXXXX the response is “I could not find that element in the database.”

Here’s a link to the project in FCC:

I’ve put the code here for any advice. I’m going to try re-writing it, again.

#!/bin/bash
PSQL="psql -X --username=freecodecamp --dbname=periodic_table --tuples-only -c" 

if [[ -z $1 ]]
      then
      echo -e "Please provide an element as an argument."
      else

    # if element_name
    if [[ $1 != "Hydrogen" || $1 != "Beryllium" || $1 != "Boron" || $1 != "Carbon" || $1 != "Nitrogen" || $1 != "Oxygen" || $1 != "Helium" || $1 != "Lithium" || $1 != "Fluorine" || $1 != "Neon" ]]
      then
		  echo -e "\nI could not find that element in the database.\n"
      else
        
        if [[ $1 == "Hydrogen" || $1 == "Beryllium" || $1 == "Boron" || $1 == "Carbon" || $1 == "Nitrogen" || $1 == "Oxygen" || $1 == "Helium" || $1 == "Lithium" || $1 == "Fluorine" || $1 == "Neon" ]] 
        then
        
        # get element_name
		    ELEMENT_NAME=$($PSQL "SELECT name FROM elements WHERE name = '$1'")
        echo "1st $ELEMENT_NAME"
      		
        # get element_name
		    ELEMENT_NAME=$($PSQL "SELECT name FROM elements WHERE name = '$1'")

		    # get symbol
        SYMBOL=$($PSQL "SELECT symbol FROM elements WHERE name='$1'")

        # get atomic_number
        ATOMIC_NUMBER=$($PSQL "SELECT atomic_number FROM elements WHERE name='$1'")

        # get atomic_mass
        ATOMIC_MASS=$($PSQL "SELECT atomic_mass FROM properties WHERE atomic_number=$ATOMIC_NUMBER")

        # get melting_point_celsius
        MPC=$($PSQL "SELECT melting_point_celsius FROM properties WHERE atomic_number=$ATOMIC_NUMBER")

        # get boiling_point_celsius 
        BPC=$($PSQL "SELECT boiling_point_celsius FROM properties WHERE atomic_number=$ATOMIC_NUMBER")

        # get type
        TYPE=$($PSQL "SELECT type FROM types INNER JOIN properties USING(type_id) WHERE atomic_number=$ATOMIC_NUMBER")

        echo -e "\nThe element with atomic number $(echo $ATOMIC_NUMBER | sed -r 's/^ *| *$//g') is $(echo $ELEMENT_NAME | sed -r 's/^ *| *$//g') ($(echo $SYMBOL | sed -r 's/^ *| *$//g')). It's a $(echo $TYPE | sed -r 's/^ *| *$//g'), with a mass of $(echo $ATOMIC_MASS | sed -r 's/^ *| *$//g') amu. $(echo $ELEMENT_NAME | sed -r 's/^ *| *$//g') has a melting point of $(echo $MPC | sed -r 's/^ *| *$//g') celsius and a boiling point of $(echo $BPC | sed -r 's/^ *| *$//g') celsius."
    fi
  fi
fi

this is always true 

I think I see the error there. If its Hydrogen, its not Beryllium…and so on.