To answer your first question I think a recap of programming languages is required:
PHP is server side, so once sent it cannot change any page content.
Javascript is client side which can change content (and display of content) after the pages has been sent.
AJAX is basically javascript that can access the server.
Any javascript code must be wrapped in a <script type="text/javascript> tag or else it will not be treated as javascript and therefore not work. If you turn off javascript from your browser, it effectively ignores any code found in those tags.
The only other common way that I know how to dynamically change display of content is via CSS pseudo-classes (like hover). I have not found one for select, but there might be one. You could have in your css:
- input.dynamic_input { display: none; }
-
form:hover input.dynamic_input { display: block; }
This too is shakey because css is not designed for this and so in this example, your input MUST be within your form tag. You will also need an extra file in the folder that your stylesheet is kept. If you're interested in the hover class, google: csshover3.htc
Long story short, you need to decide if the ~5% of users are worthwhile enough to not use javascript, and work hard to have a nice page with no
necessary javascript, or if you can live with slightly fewer visitors and no mobile phone access, to make a javascript required site.