title: chrome loads my page, firefox doesn't
body: <p>I'm trying to echo php in a web page via an HTML form (<code>test_form.php</code> --> <code>test.php</code>). The form allows users to pick a date and time. I'll show the code for <code>test_form.php</code> and <code>test.php</code> below.</p>
  
  <p>This works in Chrome (linux) -- my script checks that the date and hour are set, then echoes the date and hour in the browser.</p>
  
  <p>But it doesn't work in Firefox (linux) or Safari (Mac).</p>
  
  <p>In Firefox, I get a blank page. When I view the page source I see the echoed stuff -- except it tells me that date and hour are NOT set!</p>
  
  <p>Has anyone experienced this? Does anyone have an idea what's going on?</p>
  
  <p>thanks in advance.</p>
  
  <p>test_form.php:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL | E_NOTICE);
  ini_set('display_errors', '1');
  ?&gt;
  &lt;!DOCTYPE html&gt; 
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta charset='utf-8'&gt;
      &lt;meta name='viewport' content='width=device-width, initial-scale=1'&gt; 
      &lt;title&gt;Select date a d/or time&lt;/title&gt; 
      &lt;link rel='stylesheet' href='http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css'&gt;
      &lt;link rel="stylesheet" href="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.min.css" /&gt;
    &lt;script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/external/jquery.mousewheel.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://dev.jtsage.com/jQM-DateBox/js/doc.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.core.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.mode.calbox.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.mode.datebox.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.mode.flipbox.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.mode.slidebox.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/1.4.5/jqm-datebox-1.4.5.mode.customflip.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="http://cdn.jtsage.com/datebox/i18n/jqm-datebox.lang.utf8.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      jQuery.extend(jQuery.mobile,
      {
        ajaxEnabled: false
      });
  
   function checkForm(form)
    {
      // validation fails if the input is blank
      if(form.hour.value == "") {
        alert("Error: Please select an hour!");
        form.hour.focus();
        return false;
      }
  
      // regular expression to match only digits (0-24)
      var re = /0|(0[1-9])|(1[0-9])|(2[0-4]))/;
  
      // validation fails if the input doesn't match our regular expression
      if(!re.test(form.hour.value)) {
        alert("Error: Input contains invalid characters!");
        form.hour.focus();
        return false;
      }
  
      // validation was successful
      return true;
    }
  
  
      &lt;/script&gt;
  &lt;/head&gt; 
  
  &lt;body&gt; 
  
  &lt;div data-role='page'&gt;
      &lt;a href='#' data-rel='back' class='ui-btn ui-icon-back ui-btn-icon-notext ui-shadow ui-corner-all  ui-nodisc-icon ui-alt-icon ui-btn-inline'  data-role='button' role='button' data-inline='true'&gt;Back&lt;/a&gt;
      &lt;a href='#popupNested' data-role='button' class=' ui-btn ui-shadow ui-corner-all ui-icon-bars ui-btn-icon-notext  ui-nodisc-icon ui-alt-icon ui-btn-inline' data-transition='turn' data-rel='popup' data-inline='true'&gt;Date/time&lt;/a&gt;
  
  &lt;div data-role='popup' id='popupNested' data-theme='none'&gt;
      &lt;div data-role='collapsibleset' data-theme='a' data-content-theme='a' data-collapsed-icon='arrow-r' data-expanded-icon='arrow-d' style='margin:0; width:250px;'&gt;
          &lt;div data-role='collapsible' data-inset='false'&gt;
          &lt;h2&gt;Hourly&lt;/h2&gt;
              &lt;ul data-role='listview'&gt;
                  &lt;li&gt;&lt;a href='Manyhour_today_form.php' data-rel='dialog' data-role='date'&gt;Pick an hour from today&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href='Manyhour_form.php' data-rel='dialog'&gt;Pick hour from previous day&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;&lt;!-- /collapsible --&gt;
          &lt;div data-role='collapsible' data-inset='false'&gt;
          &lt;h2&gt;Daily&lt;/h2&gt;
              &lt;ul data-role='listview'&gt;
                  &lt;li&gt;&lt;a href='Mtoday_POG.php'&gt;So far today&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href='Manyday_form.php' data-rel='dialog'&gt;Choose a previous day&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;&lt;!-- /collapsible --&gt;
            &lt;ul data-role='listview'&gt;
                  &lt;li&gt;&lt;a href='Manymonth_form.php' data-rel='dialog'&gt;Monthly&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href='Manyyear_form.php' data-rel='dialog'&gt;Yearly&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
  
  
      &lt;/div&gt;&lt;!-- /collapsible set --&gt;
  &lt;/div&gt;&lt;!-- /popup --&gt;
      &lt;div data-role='content' style='width:50%'&gt;
  
                          &lt;form action='test.php' method='post' onsubmit='return checkForm(this);'&gt;
                          &lt;label for'date'&gt;&lt;strong&gt;Select a date and hour&lt;/strong&gt;&lt;/label&gt;
              &lt;input type="text" name='date' data-role="datebox" data-options='{"mode":"calbox","calUsePickers": true, "calYearPickMin":2008, "calYearPickMax":"NOW", "beforeToday": true, "overrideDateFormat": "%Y-%m-%d"}'  placeholder='click icon to select date'/&gt;
  
              &lt;input type="text" name='hour' data-role="datebox" data-options='{"mode":"timeflipbox","minuteStep":60, "overrideTimeFormat": "%H", "overrideTimeOutput": "%H"}'  placeholder='click icon to select hour' required="required"/&gt;
  
              &lt;input type ='submit' name= 'submit' value='submit'&gt;
             &lt;/form&gt;
      &lt;/div&gt;
  
  
  &lt;/div&gt;&lt;!-- /page --&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>... and test.php:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL | E_NOTICE);
  ini_set('display_errors', '1');
  
  
  if(isset($_POST['date']))
  {
  $date = $_POST['date'];$date = str_replace("-","",$date);echo "date IS set, and it is ".$date."&lt;br&gt;";
  }
  else {
  $date = "20150101"; echo "date variable not set";
  }
  
  if(isset($_POST['hour']))
  {
  $hour = $_POST['hour']; echo "hour IS set! And it is ".$hour."&lt;br&gt;";
  if($hour == "00"){$hour =24;}
  } 
  else {
  $hour = "01"; echo "hour variable is not set";
  }
  
  ?&gt;
  </code></pre>