PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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).
Internet Explorer Firefox Opera Google Chrome Safari
The <button> tag is supported in all major browsers.
Important: If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between the <button> and </button> tags, while other browsers will submit the content of the value attribute. Use the input element to create buttons in an HTML form.
$month = 4; echo $month; $month isn't set (but $_POST['month'] is set)
Show us your code pertaining to this problem.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Then the buttons have numbers on them (4, 5 and 6), and the text (the month names) is displayed next to them. Is there a way to display the month names on the buttons and retrieve 4, 5 or 6 when a user clicks on one of them?
As for testing on the value of $_POST['month'], this is while in MSIE. Like you said, in MSIE, Internet Explorer will submit the text between the <button> and </button> tags. However, I can't seem to identify or test for that text: