{ if($_POST['month']=="styczeń") $month="01"; if($_POST['month']=="luty") $month="02"; if($_POST['month']=="marzec") $month="03"; if($_POST['month']=="kwiecień") $month="04"; if($_POST['month']=="maj") $month="05"; if($_POST['month']=="czerwiec") $month="06"; if($_POST['month']=="lipiec") $month="07"; if($_POST['month']=="sierpień") $month="08"; if($_POST['month']=="wrzesień") $month="09"; if($_POST['month']=='październik') $month="10"; if($_POST['month']=="listopad") $month="11"; if($_POST['month']=="grudzień") $month="12"; if($_POST['year']=="2012") $year="2012"; if($_SERVER['REQUEST_METHOD'] == 'POST') $_SESSION['month'] = $_POST['month'];
Tutaj chcę w sesji przechować wybór z SelectBoxa
Drugi przycisk:
$month=$_SESSION['month'] { if($_POST['month']=="styczeń") $month="01"; if($_POST['month']=="luty") $month="02"; if($_POST['month']=="marzec") $month="03"; if($_POST['month']=="kwiecień") $month="04"; if($_POST['month']=="maj") $month="05"; if($_POST['month']=="czerwiec") $month="06"; if($_POST['month']=="lipiec") $month="07"; if($_POST['month']=="sierpień") $month="08"; if($_POST['month']=="wrzesień") $month="09"; if($_POST['month']=='październik') $month="10"; if($_POST['month']=="listopad") $month="11"; if($_POST['month']=="grudzień") $month="12"; if($_POST['year']=="2012") $year="2012"; } else { $month=$_SESSION['month']; }
Ten ma przechwytywać wybór ( po to sesja ) kiedy wciśnę przycisk 1. Ale wyskakuje mi nota, że zmienna month nie jest zidentyfikowana ( sesja się nie przypisuje? )