Looking for TOA guidance

char text[6];
      if(text[6] == text1){

A 6 element array does NOT have a [6] value.

Your code is complete nonsense, with so much of it based on an array element that doesn't exist.