PEAK XOOPS - Re: ミニ白扇の使い方 (3) in englishin japanese

Top  >  Comments  >  News comment ()

Re: ミニ白扇の使い方 (3)

  • As this forum is only for commentation, you cannot open a new topic
  • Guests cannot post into this forum
Target News
Subject How to use minihaku (3)
Summary How to add fields.This is an example to add two columns "sex" and "birth".I. ALTER TABLE (add columns into users table of DB)ALTER TABLE (prefix)_users ADD sex tinyint not null default 0 ;ALTER TABLE (prefix)_users ADD birth date not null default '1950...
Previous post - Next post | Parent - Children.1 | Posted on 2006/12/9 18:35
tsujiemon  Private   Posts: 2
PHP初心者です。(Javaエンジニアです) 基本的なことなのかもしれませんが、わからないので、教えていただきたいのですが。

「II-1 登録フォームに追加」のところで「$sex_options」という変数を使われていますが、この変数にはどこで値がセットされるのでしょうか?

都道府県のセレクトボックスを追加しようとしているのですが、うまくいきません。
下記のような感じで行っています。
minihaku_register.php
---------
<td class="even"><select name="user_from">{html_options options=$user_from_options selected=$user_from}</select></td>
---------

config.php
---------
$extra_fields = array(
'user_from' => array(
'initval' => -1,
'options' => array(
1 => '北海道',
2 => '青森県',

---------

よろしくお願い致します。
Votes:1 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/12/9 20:17
tsujiemon  Private   Posts: 2
自己レスです。

うまくいかなかった原因がわかりました。
minihaku_register.phpの記述がまずかったようです。
以下、修正したものです。
---------
<td class="even"><select name="user_from"><{html_options options=$user_from_options selected=$user_from}></select></td>
---------

また、「$sex_options」という変数をセットしている場所もわかりました。
registerhook.phpの最後の方でやっているんですね。


お騒わせしまして申し訳ありませんでした。
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!