alin19 Posted January 28, 2008 Share Posted January 28, 2008 what i have done wrong here? <form method="POST"> <b>Luna:</b> <select value="month"> <option value="Ianuarie">Ianuarie</option> <option value="Februarie">Februarie</option> <option value="Martie">Martie</option> <option value="Aprilie">Aprilie</option> <option value="Mai">Mai</option> <option value="Iunie">Iunie</option> <option value="Iulie">Iulie</option> <option value="August">August</option> <option value="Septembrie">Septembrie</option> <option value="Octombrie">Octombrie</option> <option value="Noiembrie">Noiembrie</option> <option value="Decembrie">Decembrie</option> </select> <b>Ziua: </b><select value="day"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <input type="submit"> </form> <?php $a=isset ($_POST['day']); $b=isset ($_POST['month']); echo "you have selected month: " , $a,"and day: " , $b; ?> Quote Link to comment https://forums.phpfreaks.com/topic/88185-solved-select-form/ Share on other sites More sharing options...
trq Posted January 28, 2008 Share Posted January 28, 2008 <?php if (isset($_POST['day']) && isset($_POST['month'])) { $a = $_POST['day']; $b = $_POST['month']; echo "you have selected month: $a and day: $b"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/88185-solved-select-form/#findComment-451183 Share on other sites More sharing options...
alin19 Posted January 28, 2008 Author Share Posted January 28, 2008 sorry but i don't get any result; the page simply reloads Quote Link to comment https://forums.phpfreaks.com/topic/88185-solved-select-form/#findComment-451184 Share on other sites More sharing options...
trq Posted January 28, 2008 Share Posted January 28, 2008 You need... <select name="month"> and <select name="day"> Quote Link to comment https://forums.phpfreaks.com/topic/88185-solved-select-form/#findComment-451187 Share on other sites More sharing options...
alin19 Posted January 28, 2008 Author Share Posted January 28, 2008 10x Quote Link to comment https://forums.phpfreaks.com/topic/88185-solved-select-form/#findComment-451190 Share on other sites More sharing options...
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.