$name\n"; } // given struct, show form for editing // function project_specific_prefs_edit($prefs) { $x = $prefs->color_scheme; echo "\n Color scheme:\n \n \n \n "; } // QUERY_STRING has already been parsed into variables. // Return XML version of project-specific prefs // function project_specific_prefs_parse_form() { parse_str(getenv("QUERY_STRING")); return "$color_scheme"; } // show non-editable version of prefs // function project_specific_prefs_show($prefs) { echo "\n Color scheme:\n "; if ($prefs->color_scheme) { echo $prefs->color_scheme; } else { echo "None selected"; } echo "\n"; } // parse XML, fill in struct // function project_specific_prefs_parse($prefs_xml) { $prefs->color_scheme = parse_element($prefs_xml, ""); return $prefs; }