Some of your conditions make no sense and the syntax is wrong.
Always use error reporting when testing php to find errors quickly. Though I expect this advice to go the same way as the multiple times you have been advised to use the validator to identify errors in your html syntax, in which case you are refusing to be helped and thus cannot be helped.
That validator of for html. Use if on your html.
For php enable error reporting. It can be configured to display errors on screen in a development environment, or can log errors to a file on a live server.
Any errors and warnings are identified when the script is run. This is essential in debugging and development, you are stumbling around in the dark without it.
When you post code on the forums, you need to format it so it will display correctly. You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.