I recently started using PHP and came across a problem while trying to use a PHP script as an option value. Here’s what the code basically looks like:
[php]
Option One ">Option Two[/php]
What’s wrong with this code?
I recently started using PHP and came across a problem while trying to use a PHP script as an option value. Here’s what the code basically looks like:
[php]
Option One ">Option Two[/php]
What’s wrong with this code?
The code is fine. But it is not clear what is your goal? When you submit form, the value entered to text field named “option” will be added as option to your select element. Probably you meant to interactively populate select box with new options without submitting the form? If so - you need to use javascript (ex: jQuery library).