Jump to content

Need help with Booking Site


jp2123

Recommended Posts

I'm new to this blog but need serious help. I want to add a calendar to a Hotel website for the booking part, I did it once but I forgot how to do it. Here is the link to the booking file. http://regencycountryclub.com/QuickReserve.php I just want instead of having to select the day, month and year. I want to add a calendar to select the arrival date and departure date. I would really appreciate the help. Thanks

Link to comment
Share on other sites

I'm not sure what to provide but I will start with this. I was able to install some calendar through js. Here is the example.

 

http://regencycountryclub.com/QuickReserve2.php

 

However, I noticed that the date is not being picked up when I click on book. This is due to how the code is set up. But I have very little knowledge of coding so I'm not sure how to fix it. For example. To add the "calendar" input I added the code

 

<input type="text" name="date" class="tcal" value="" />

 

However here is the problem. Due to the fact that the previous booking was based on selecting separately the day, month and year I can't find the way that the code will read the selected day,month, year from the calendar input. This is the code for day,month,year selection.

 

function data_quick()
{
var g_o	= <?php echo date('j'); ?>;
var m_o	= <?php echo date('n'); ?>;
var a_o	= <?php echo date('Y'); ?>;

var g_d	= <?php echo date('j',mktime(0,0,0,date('n'),date('j')+1,date('Y'))); ?>;
var m_d	= <?php echo date('n',mktime(0,0,0,date('n'),date('j')+1,date('Y'))); ?>;
var a_d	= <?php echo date('Y',mktime(0,0,0,date('n'),date('j')+1,date('Y'))); ?>;

document.getElementById('gg').value = g_o;
document.getElementById('mm').value = m_o;
document.getElementById('aa').value = a_o;

document.getElementById('ggf').value = g_d;
document.getElementById('mmf').value = m_d;
document.getElementById('aaf').value = a_d;
}

 

The selection code for the booking used to be.

 

								<SELECT
	class="tcal" size="1" name="gg" id="gg">
			<OPTION value="1">1</OPTION><OPTION value="2">2</OPTION><OPTION value="3">3</OPTION><OPTION value="4">4</OPTION><OPTION value="5">5</OPTION><OPTION value="6">6</OPTION><OPTION value="7">7</OPTION><OPTION value="8">8</OPTION><OPTION value="9">9</OPTION><OPTION value="10">10</OPTION><OPTION value="11">11</OPTION><OPTION value="12">12</OPTION><OPTION value="13">13</OPTION><OPTION value="14">14</OPTION><OPTION selected value="15">15</OPTION><OPTION value="16">16</OPTION><OPTION value="17">17</OPTION><OPTION value="18">18</OPTION><OPTION value="19">19</OPTION><OPTION value="20">20</OPTION><OPTION value="21">21</OPTION><OPTION value="22">22</OPTION><OPTION value="23">23</OPTION><OPTION value="24">24</OPTION><OPTION value="25">25</OPTION><OPTION value="26">26</OPTION><OPTION value="27">27</OPTION><OPTION value="28">28</OPTION><OPTION value="29">29</OPTION><OPTION value="30">30</OPTION><OPTION value="31">31</OPTION> 		</SELECT> <SELECT class="myinput" size="1" name="mm" id="mm">

			<OPTION value="1">1</OPTION><OPTION value="2">2</OPTION><OPTION value="3">3</OPTION><OPTION value="4">4</OPTION><OPTION value="5">5</OPTION><OPTION selected value="6">6</OPTION><OPTION value="7">7</OPTION><OPTION value="8">8</OPTION><OPTION value="9">9</OPTION><OPTION value="10">10</OPTION><OPTION value="11">11</OPTION><OPTION value="12">12</OPTION> 		</SELECT> <SELECT class="myinput" size="1" name="aa" id="aa">
			<OPTION selected value="2011">2011</OPTION><OPTION value="2012">2012</OPTION> 		</SELECT>

 

So basically I deleted this last code from the php file and instead pasted the first code I provided. My question is how do I make the new calendar code to work like the old one in function? I don't know if you understand.

 

Also as you can see in the last code every info is separate. There is a selection for day, then another one for month, and another one for year etc... In the calendar setup it's not divided like that. I don't know if I'm making any sense.

Link to comment
Share on other sites

Actually I'm making some progress just need an extra push to finish but don't know how to go from here. Check this url

 

http://www.regencycountryclub.com/booking-online.php?gg=12%2F10%2F2011&ggf=13%2F10%2F2011&tot_adulti=2&tot_bambini=&tot_camere=1&codice_cli=&headvar=ok&dc=974&lingua_int=eng&id_stile=6666&tappa_1_id_albergo=8899&id_canale=&id_gruppo=&n_tappe=1&id_percorso=&id_affiliazione=&id_prodotto_sel=

 

You see it says gg=12.....ggf=13 well those were the days that I choos as you can see the first 2%F"10" is the month and the next one the year. However for the booking system to recognize the date inserted with the calendar it needs to look something like this gg=12&mm=10&aa=2011&ggf=13....

 

gg=day

mm=month

aa=year

 

ggf= departure day....

 

In the code I used id="gg" and name="gg" my question will be how to make it work with mm, and aa?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.