php part of wordpress module -


somebody has made module, have change don't understand wrote. $dnssec var give value? , if statement echo "selected"?

<tr>         <th>dnssec:</th>         <td>             <select name="domeinnaam_extensies_dnssec">                 <option value="ja" <?php                     if ($dnssec == "ja") {                         echo "selected";                     }                     ?>>ja</option>                 <option value="nee" <?php                     if ($dnssec == "nee") {                         echo "selected";                     }                     ?>>nee</option>             </select>         </td>     </tr> 

your code setting selected option of select.

so, $dnssec variable initiated somewhere before current code.

the if statement used check whether variable $dnssec equal ja or nee return true or false , based on condition, it'll set selected option accordingly.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -