次のページを含むフレームセットがあります。
top.php
left.php
right.html
right.html は、json メソッドを介して database.php を使用してデータベースにアクセスし、変数を渡します。Left.php には、データベースからのアイテムで生成された選択リストがあります。選択すると、変数が Joomla セッションに保存され、右側のページが更新されます。更新により、database.php が json でアクティブ化されます。
私の質問は:
変数を Joomla セッションに保存できます。left.php でこの変数に対してエコーを実行すると、変数が画面に表示されます。ただし、database.php を初めてアクティブ化すると、joom セッション変数から値が取得されません。すでに left.php に設定されていますが。ただし、left.php 選択ボックスからアイテムを選択すると、機能します。
次のコードは、変数の設定と取得のために left.php で使用されます。
//If the input select item was selected (when the user has selected a item from
select box) use that item to fill the Joomla session variable.
if(isset($_POST['PeriodeSelectname'])){
$JaarKwartaal=$_POST['PeriodeSelectname'];
$session->set('JaarKwartaal', $JaarKwartaal);
//echo "<P>session-set=" . $session->get('JaarKwartaal');
}
//if no item of the input select is selected (in case of the first time) the first
item of the $periodes array to fill the Joomla session variable
if(!isset($_POST['PeriodeSelectname'])){
$session->set('JaarKwartaal', $periodes[0]);
//echo "<P>session-notset=" . $session->get('JaarKwartaal');
}
私は何を間違っていますか?
前もって感謝します!
ピート