title: Error message displayed
body: <p>I have a two pages index.php and seat.php
  When the user select <code>arrival</code>,<code>destination</code> and <code>date</code> from <code>index.php</code> page then he retrieve the value from database. The user choose value of database and then move to the next page. But I faced a problem when a user move to the <code>seat.php</code> page he can't get the date selected in <code>index.php</code> page (not show in text box).</p>
  
  <p>The error message is </p>
  
  <blockquote>
    <p>Notice: Undefined index: doj in C:\wamp\www\ Ticket Reservation System\seat.php Call Stack)</p>
  </blockquote>
  
  <p>here this is the code for index page: </p>
  
  <pre><code>&lt;?php
      include("dbconnect.php");
      session_start();
      $_SESSION['date'] = 'doj';
  ?&gt;
  
  &lt;form method="POST"&gt;
    &lt;td width="48" height="32" class="simpletext"&gt;FROM:&lt;/td&gt;
    &lt;td width="107"&gt;
      &lt;div align="justify"&gt;
        &lt;select class="html-text-box" ; font-style:oblique; width:100px; font-family:verdana; font-weight:bold" name="from"&gt;
      &lt;option value=" " selected&gt;:: Departure ::&lt;/option&gt;
      &lt;option value="ABBOTTABAD "&gt;ABBOTTABAD&lt;/option&gt;
      &lt;option value="BAHAWALPUR " &gt;BAHAWALPUR&lt;/option&gt;
      &lt;option value="CHINIOT " &gt;CHINIOT&lt;/option&gt;
      &lt;td width="24 " align="right "  class="simpletext "&gt;&lt;div align="center "&gt;TO:    &lt;/div&gt;&lt;/td&gt;
      &lt;/select&gt;
      &lt;td width="107 "  align="left "&gt;&lt;select class="html-text-box "     font-  style:oblique; width:100px; font-family:verdana; font-weight:bold" name="to"&gt;
          &lt;option value="" selected&gt;:: Arrival ::&lt;/option&gt;
          &lt;option value="ABBOTTABAD"&gt;ABBOTTABAD&lt;/option&gt;
          &lt;option value="BAHAWALPUR"&gt;BAHAWALPUR&lt;/option&gt;
        &lt;/select&gt;
        &lt;tr&gt;
          &lt;td height="32" class="simpletext"&gt;DEPERATURE&lt;/td&gt;
          &lt;td&gt;
            &lt;div data-date-format="yyyy-mm-dd" data- date="document.write(date())" class="input-append date myDatepicker"&gt;
              &lt;input type="text" value="" name="doj" size="16" class="span2" required&gt;&lt;span class="add-on"&gt;&lt;i class="icon-calendar"&gt;  &lt;/i&gt;&lt;/span&gt; 
            &lt;/div&gt;
          &lt;/td&gt;
      &lt;/div&gt;
      &lt;td align="right" class="simpletext"&gt;RETURN:&lt;/td&gt;
      &lt;td&gt;
        &lt;div data-date-format="yyyy-mm-dd" data-date="document.write(date())" class="input-append date myDatepicker"&gt;
          &lt;input type="text" value="" name="doj" size="12" class="span2" required&gt;
          &lt;span class="add-on"&gt;&lt;i class="icon-calendar"&gt;&lt;/i&gt;&lt;/span&gt; 
        &lt;/div&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td height="34" colspan="4" align="center" valign="middle"&gt;
          &lt;p&gt;
            &lt;input type="submit" name="search" value="Search" onClick="return callfrm(document.getElementById('currentdate').value);" class="html-button"&gt;
            &lt;input type="submit" name="resert" value="Reset" class="html- button"&gt;
          &lt;/p&gt;
          &lt;p&gt;&amp;nbsp;&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>this is the code that i use for seat page</p>
  
  <pre><code>&lt;?php
      session_start();
      $date = $_SESSION['doj'];   
  ?&gt;
  &lt;?php
      $date = strip_tags( utf8_decode( $_POST['doj'] ) );
      $query = "select * from seat where date = '" . $date . "'";
      $result = mysql_query($query);
      {
      }           
  
      &lt;label&gt;Date of Journey&lt;/label&gt;
  &lt;?php
      echo "&lt;input type='text' class='span2'     name='doj' value='". $date ."' readonly/&gt;";
  ?&gt;
  </code></pre>