Jump to content
  • 0

Передача данных из формы


LSTI
 Share

Question

Имеется форма месяцев:

Код:

$m = date("m", time()); 
$y = date("Y", time());
$d = date("d", $time);
$month = array("1"=>"Січень","2"=>"Лютий","3"=>"Березень","4"=>"Квітень","5"=>"Травень", "6"=>"Червень", "7"=>"Липень","8"=>"Серпень","9"=>"Вересень","10"=>"Жовтень","11"=>"Листопад","12"=>"Грудень");

echo "<center><form action='' name ='calControl' method='POST'>
<select name='month' style='width:80px'>";
$fm=$m;

echo "
<option value='$fm'>Січень</option>
<option value='$fm'>Лютий</option>
<option value='$fm'>Березень</option>
<option value='$fm'>Квітень</option>
<option value='$fm'>Травень</option>
<option value='$fm'>Червень</option>
<option value='$fm'>Липень</option>
<option value='$fm'>Серпень</option>
<option value='$fm'>Вересень</option>
<option value='$fm'>Жовтень</option>
<option value='$fm'>Листопад</option>
<option value='$fm'>Грудень</option>";

$fm = $select_fm;
echo " </select>
<input type='button' name='Go' value='Відобразити'>";

echo "
</FORM>";

и PHP функция календаря cal_news($m,$y) .

Как из формы передать выбранное значение месяца в PHP функцию, чтобы она по этому значению формировала календарь на выбранный месяц.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy