php - loading value into a select? -


When my form is loaded (with variable), then I will assign the value of most text form items to Easily set up with tags:

  & lt; Input type = "text" name = "fname" id = "fname" value = "& lt ;? php print" $ fname ";? Gt;" / & Gt;  

How can I do this with Choose input form elements? I think I have to use a script?

Thank you very much

You have selected < To add / code> attribute, for example

  & lt; Option value = "foo" & lt ;? Php echo ($ value == "foo")? 'Selected =' selected '': ''; ? & Gt; & Gt; Bar & lt; / Options & gt;  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -