CONVã®ä½¿ãæ¹ï¼ç¹æ®ç½®æå¤
radioãã¿ã³ã¨ãselectãã¿ã³ã¨ãã§ãå
¥åãããå¤ãä¿æããããæã«ä½¿ãããã
é½éåºçã®å ´åã¯ã ããããç®±( http://www.gjmj.net/ )ãä¸ã«ãã http://www.gjmj.net/area.html ã端çã«æ¥½ãªãã ãã©(ç¬
æ¸å¼ã¯ããããªæãã
<!-- é½éåºçã®å ´åï¼SELECTã®å ´åãã¨ããã --> <SELECT name="area"> <option value="1" ***area:1*** >åæµ·é</option> <option value="2" ***area:2*** >é森ç</option> <option value="3" ***area:3*** >岩æç</option> <option value="4" ***area:4*** >å®®åç</option> <option value="5" ***area:5*** >ç§ç°ç</option> <option value="6" ***area:6*** >山形ç</option> <option value="7" ***area:7*** >ç¦å³¶ç</option> <option value="8" ***area:8*** >è¨åç</option> <option value="9" ***area:9*** >æ æ¨ç</option> <option value="10" ***area:10*** >群馬ç</option> <option value="11" ***area:11*** >å¼çç</option> <option value="12" ***area:12*** >åèç</option> <option value="13" ***area:13*** >æ±äº¬é½</option> <option value="14" ***area:14*** >ç¥å¥å·ç</option> <option value="15" ***area:15*** >æ°æ½ç</option> <option value="16" ***area:16*** >å¯å±±ç</option> <option value="17" ***area:17*** >ç³å·ç</option> <option value="18" ***area:18*** >ç¦äºç</option> <option value="19" ***area:19*** >山梨ç</option> <option value="20" ***area:20*** >é·éç</option> <option value="21" ***area:21*** >å²éç</option> <option value="22" ***area:22*** >é岡ç</option> <option value="23" ***area:23*** >æç¥ç</option> <option value="24" ***area:24*** >ä¸éç</option> <option value="25" ***area:25*** >æ»è³ç</option> <option value="26" ***area:26*** >京é½åº</option> <option value="27" ***area:27*** >大éªåº</option> <option value="28" ***area:28*** >å µåº«ç</option> <option value="29" ***area:29*** >å¥è¯ç</option> <option value="30" ***area:30*** >åæå±±ç</option> <option value="31" ***area:31*** >é³¥åç</option> <option value="32" ***area:32*** >å³¶æ ¹ç</option> <option value="33" ***area:33*** >岡山ç</option> <option value="34" ***area:34*** >åºå³¶ç</option> <option value="35" ***area:35*** >å±±å£ç</option> <option value="36" ***area:36*** >徳島ç</option> <option value="37" ***area:37*** >é¦å·ç</option> <option value="38" ***area:38*** >æåªç</option> <option value="39" ***area:39*** >é«ç¥ç</option> <option value="40" ***area:40*** >ç¦å²¡ç</option> <option value="41" ***area:41*** >ä½è³ç</option> <option value="42" ***area:42*** >é·å´ç</option> <option value="43" ***area:43*** >çæ¬ç</option> <option value="44" ***area:44*** >大åç</option> <option value="45" ***area:45*** >å®®å´ç</option> <option value="46" ***area:46*** >鹿å 島ç</option> <option value="47" ***area:47*** >æ²ç¸ç</option> </SELECT> <!-- æ§å¥ã®å ´åãæãã¯radioãã¿ã³ã¨ããã --> <input type="radio" name="sex" value="male" ***sex:male*** >ç·æ§ <input type="radio" name="sex" value="female" ***sex:female*** >女æ§
ãã§ãã¯ããã¯ã¹ãã¡ã¨æå
ã«ãªãã£ããã ãã©(å¾ã§æ¸ã足ããã)ãæ¸å¼ã¯å
¨ãæã£ã¦ä¸ç·ã
nameã¢ããªãã¥ã¼ãã®ã¢ããªãã¥ã¼ãå¤ã¨valueã¢ããªãã¥ã¼ãã®ã¢ããªãã¥ã¼ãå¤ãæ¸ãã¦ããæãã°OKã
ã§ãããã°ã©ã ã¯â¦ä»ã¯ conv_util.incã«ãã
// checkedç¨ï¼radio , checkboxç¨ static public function monoDicChecked($conv, $name, $value) // selectedç¨ï¼select option ç¨ static public function monoDicSelected($conv, $name, $value)
ã使ãã°è¶³ããã¶ã³ã¹ãä¾ãã°æ§å¥ã®å ´å
$sex = $_POST['sex']; conv_util::monoDicChecked($conv, 'sex', $sex);
ã£ã¦æããcheckboxã®å ´åã第ä¸å¼æ°ãé
åã§æ¸¡ãã°OK(ã£ã¤ãæ¬æ¥é
åãåºæ¬ãªã®ã§)ã
ãã®åã®ä¾¿å©ãªã®ã¯ãè¦ç´ ãå¢ãã¦ãããã°ã©ã ãå¤æ´ããªãã§ããã£ã¦ã¨ããã