MSIE returns different type than Firefox
Posted: Sat Feb 27, 2010 8:38 pm
Hi,
If you save the following snippet as testcal.php, and run it in Firefox, $_POST['month'] will return 4, 5 or 6 when you click on one of the three buttons. If you run it in MSIE, $_POST['month'] will return April, May or June. A) Is this standard behavior for MSIE or am I doing something wrong with the buttons? B) When I try a test like if ($_POST['month'] == 'Avril') $month = 4; echo $month; $month isn't set (but $_POST['month'] is set).
Thank you,
Alain
-----
s.dot - Please use [ php ] and [ /php ] tags to post php code.
If you save the following snippet as testcal.php, and run it in Firefox, $_POST['month'] will return 4, 5 or 6 when you click on one of the three buttons. If you run it in MSIE, $_POST['month'] will return April, May or June. A) Is this standard behavior for MSIE or am I doing something wrong with the buttons? B) When I try a test like if ($_POST['month'] == 'Avril') $month = 4; echo $month; $month isn't set (but $_POST['month'] is set).
Code: Select all
<?php
echo "<form action='testcal.php' method='post'>";
echo "<button class='button validate' type='submit' name='month' value='4'><font size=4 >4</font>April</button>";
echo " ";
echo "<button class='button validate' type='submit' name='month' value='5'><font size=4 >5</font>May</button>";
echo " ";
echo "<button class='button validate' type='submit' name='month' value='6'><font size=4 >6</font>June</button>";
echo " ";
echo "</form>";
if (isset($_POST['month']))
{
echo $_POST['month']
}
?>Alain
-----
s.dot - Please use [ php ] and [ /php ] tags to post php code.