If /Else

I’m new to coding, and I need help with the if/else functions.

I would like my website to check what is in a text input when the submit button is pressed, and then result should redirect to different pages or if it does not contain neither X nor Y show an error message.

If textbox contains X → then redirect to page X
If textbox contains Y → then redirect to page Y
If textbox contains something else → Display error message

Does anyone know how this can be done and please be and please be very educational :slight_smile:

All the best,
Julie