How to echo the 'selected' value without using the submit button

here is the code

[code]Font

Arial Times New Roman [/code]

It is supposed to echo the value selected but it does nothing any ideas regarding what i should do?
Also what i really want to do is create a cookie which will contain the selected value and then use this value of the cookie later. But I cant even manage to echo the values so thought it would be better to first learn how to echo and then try to create a cookie out of it

Works fine for me.
Have you got your server setup correctly?

You can’t put PHP inside of JavaScript (onchange). The PHP will be evaluated before the HTML is even sent to the user, so the onchange method will always be the same (in this case, the text ‘selected’).

Sponsor our Newsletter | Privacy Policy | Terms of Service