Closing PHP tag and adding some XHTML
authorjervfors <jervfors@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 9 May 2004 10:19:50 +0000 (10:19 +0000)
committerjervfors <jervfors@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 9 May 2004 10:19:50 +0000 (10:19 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7406 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/forms.php

index 0d5bfef30a0c564d93739a111a6dd85e5e22136d..f3efadde088efac316225c31747fd8ebf4a97936 100644 (file)
@@ -21,7 +21,7 @@ function addInputField($type, $name = null, $value = null, $attributes = '') {
     return '<input type="'.$type.'"'.
         ($name  !== null ? ' name="'.htmlspecialchars($name).'"'   : '').
         ($value !== null ? ' value="'.htmlspecialchars($value).'"' : '').
-        $attributes . ">\n";
+        $attributes . " />\n";
 }
 
 /**
@@ -37,7 +37,7 @@ function addPwField($name , $value = null) {
  */
 function addCheckBox($name, $checked = false, $value='') {
     return addInputField('checkbox', $name, $value,
-        ($checked ? ' checked' : ''));
+        ($checked ? ' checked="checked"' : ''));
 }
 
 /**
@@ -45,7 +45,7 @@ function addCheckBox($name, $checked = false, $value='') {
  */
 function addRadioBox($name, $checked = false, $value='') {
     return addInputField('radio', $name, $value, 
-        ($checked ? ' checked' : ''));
+        ($checked ? ' checked="checked"' : ''));
 }
 
 /**
@@ -94,7 +94,7 @@ function addSelect($name, $values, $default = null, $usekeys = false)
         if(!$usekeys) $k = $v;
         $ret .= '<option value="' .
             htmlspecialchars( $k ) . '"' .
-            (($default == $k) ? ' selected':'') .
+            (($default == $k) ? ' selected="selected"':'') .
             '>' . htmlspecialchars($v) ."</option>\n";
     }
     $ret .= "</select>\n";
@@ -144,4 +144,4 @@ function addForm($action, $method = 'POST', $name = '', $enctype = '', $charset
         $enctype . $name . $charset . "\">\n";
 }
 
-
+?>
\ No newline at end of file