setting up 48 hour window for php booking system
<p>I need some help at the moment with a booking system I'm developing.</p>

<p>I am trying to incorporate a 48 hour difference in all books made.</p>

<p>For example if a customer logs on to make a booking on 14/09/2011 03:28.</p>

<p>The system would only allow him to book from 16/09/2011 onwards.</p>

<p>Not only this but I want the system to only display dates in a certain year.</p>

<p>So the customer logging in on 14/09/2011 would only see dates from September to December. 2011 and not anything before or beyond that!</p>

<p><strong>How do I set up a 48 hour window for all bookings (i.e. +48 hours) and set a cut off date of the end of the year?</strong></p>

<p>Would appreciate any help.</p>

<p>Many thanks in advance! </p>

<pre><code>&lt;label for="date"&gt;&lt;?php echo __('Pickup Date') ?&gt; &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
    &lt;select name="day"&gt;
      &lt;option value="1"   &gt; 01 &lt;/option&gt;
      &lt;option value="2"   &gt; 02 &lt;/option&gt;
      &lt;option value="3"   &gt; 03 &lt;/option&gt;
      &lt;option value="4"   &gt; 04 &lt;/option&gt;
      &lt;option value="5"   &gt; 05 &lt;/option&gt;
      &lt;option value="6"   &gt; 06 &lt;/option&gt;
      &lt;option value="7"   &gt; 07 &lt;/option&gt;
      &lt;option value="8"   &gt; 08 &lt;/option&gt;
      &lt;option value="9"   &gt; 09 &lt;/option&gt;
      &lt;option value="10"   &gt; 10 &lt;/option&gt;
      &lt;option value="11"   &gt; 11 &lt;/option&gt;
      &lt;option value="12"   &gt; 12 &lt;/option&gt;
      &lt;option value="13"   &gt; 13 &lt;/option&gt;
      &lt;option value="14"   &gt; 14 &lt;/option&gt;
      &lt;option value="15"   &gt; 15 &lt;/option&gt;
      &lt;option value="16"   &gt; 16 &lt;/option&gt;
      &lt;option value="17"   &gt; 17 &lt;/option&gt;
      &lt;option value="18"   &gt; 18 &lt;/option&gt;
      &lt;option value="19"   &gt; 19 &lt;/option&gt;
      &lt;option value="20"   &gt; 20 &lt;/option&gt;
      &lt;option value="21"   &gt; 21 &lt;/option&gt;
      &lt;option value="22"   &gt; 22 &lt;/option&gt;
      &lt;option value="23"   &gt; 23 &lt;/option&gt;
      &lt;option value="24"   &gt; 24 &lt;/option&gt;
      &lt;option value="25"   &gt; 25 &lt;/option&gt;
      &lt;option value="26"   &gt; 26 &lt;/option&gt;
      &lt;option value="27"   &gt; 27 &lt;/option&gt;
      &lt;option value="28"   &gt; 28 &lt;/option&gt;
      &lt;option value="29"   &gt; 29 &lt;/option&gt;
      &lt;option value="30"   &gt; 30 &lt;/option&gt;
      &lt;option value="31"   &gt; 31 &lt;/option&gt;
    &lt;/select&gt;
    &lt;/select&gt;
    &amp;nbsp;:&amp;nbsp;
    &lt;select name="monthyear"&gt;
      &lt;option value="January &lt;?php echo date("Y"); ?&gt;"&gt;January &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="February &lt;?php echo date("Y"); ?&gt;"&gt;February &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="March &lt;?php echo date("Y"); ?&gt;"&gt;March &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="April &lt;?php echo date("Y"); ?&gt;"&gt;April &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="May &lt;?php echo date("Y"); ?&gt;"&gt;May &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="June &lt;?php echo date("Y"); ?&gt;"&gt;June &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="July &lt;?php echo date("Y"); ?&gt;"&gt;July &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="August &lt;?php echo date("Y"); ?&gt;"&gt;August &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="September &lt;?php echo date("Y"); ?&gt;"&gt;September &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="October &lt;?php echo date("Y"); ?&gt;"&gt;October &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="November &lt;?php echo date("Y"); ?&gt;"&gt;November &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
      &lt;option value="December &lt;?php echo date("Y"); ?&gt;"&gt;December &lt;?php echo date("Y"); ?&gt;&lt;/option&gt;
    &lt;/select&gt;&lt;p&gt;
    &lt;label for="time"&gt;&lt;?php echo __('Pickup Time') ?&gt; &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
    &lt;select name="hour"&gt;
      &lt;option value="00"  &gt;00&lt;/option&gt;
      &lt;option value="01"  &gt;01&lt;/option&gt;
      &lt;option value="02"  &gt;02&lt;/option&gt;
      &lt;option value="03"  &gt;03&lt;/option&gt;
      &lt;option value="04"  &gt;04&lt;/option&gt;
      &lt;option value="05"  &gt;05&lt;/option&gt;
      &lt;option value="06"  &gt;06&lt;/option&gt;
      &lt;option value="07"  &gt;07&lt;/option&gt;
      &lt;option value="08"  &gt;08&lt;/option&gt;
      &lt;option value="09"  &gt;09&lt;/option&gt;
      &lt;option value="10"  &gt;10&lt;/option&gt;
      &lt;option value="11"  &gt;11&lt;/option&gt;
      &lt;option value="12"  &gt;12&lt;/option&gt;
      &lt;option value="13"  &gt;13&lt;/option&gt;
      &lt;option value="14"  &gt;14&lt;/option&gt;
      &lt;option value="15"  &gt;15&lt;/option&gt;
      &lt;option value="16"  &gt;16&lt;/option&gt;
      &lt;option value="17"  &gt;17&lt;/option&gt;
      &lt;option value="18"  &gt;18&lt;/option&gt;
      &lt;option value="19"  &gt;19&lt;/option&gt;
      &lt;option value="20"  &gt;20&lt;/option&gt;
      &lt;option value="21"  &gt;21&lt;/option&gt;
      &lt;option value="22"  &gt;22&lt;/option&gt;
      &lt;option value="23"  &gt;23&lt;/option&gt;
    &lt;/select&gt;
    &amp;nbsp;:&amp;nbsp;
    &lt;select name="minutes"&gt;
      &lt;option value="00"  &gt;00&lt;/option&gt;
      &lt;option value="05"  &gt;05&lt;/option&gt;
      &lt;option value="10"  &gt;10&lt;/option&gt;
      &lt;option value="15"  &gt;15&lt;/option&gt;
      &lt;option value="20"  &gt;20&lt;/option&gt;
      &lt;option value="25"  &gt;25&lt;/option&gt;
      &lt;option value="30"  &gt;30&lt;/option&gt;
      &lt;option value="35"  &gt;35&lt;/option&gt;
      &lt;option value="40"  &gt;40&lt;/option&gt;
      &lt;option value="45"  &gt;45&lt;/option&gt;
      &lt;option value="50"  &gt;50&lt;/option&gt;
      &lt;option value="55"  &gt;55&lt;/option&gt;
    &lt;/select&gt;
</code></pre>
