Forum Moderators: coopster
requirements:
must be compatible with multiple versions of PHP but at the minimum php 4
each date can only be purchased once
purchased dates must be blocked or greyed out or something to that effect
dates must be searchable
Thanks
What you need is a calendar interface to begin with. Are you sure hotscripts.com have nothing you can use?
Another place you can try is the PHP Classes Repository
[phpclasses.org....]
Good luck,
dc
Thanks for all the great suggestions!
<input type=\"checkbox\" name=\"bla\" disabled>
disabled tells it to stay grey and not be tickable, wethter this works on every browser or is a m$ thing I havent tested yet but that should help you
This is the code I use to populate the select box
<?php
$day = getdate();
$current_year = $day['year'];
$month = $day['month'];
$today = $day['mday'];
echo "
<select name=\"month\">
<option value=\"January\"";
if($month=="January")
echo " selected ";
echo ">January</option>";
echo "<option value=\"February\"";
if($month=="February")
echo " selected ";
echo ">February</option>";
echo "<option value=\"March\"";
if($month=="March")
echo " selected ";
echo ">March</option>";
echo "<option value=\"April\"";
if($month=="April")
echo " selected ";
echo ">April</option>";
echo "<option value=\"May\"";
if($month=="May")
echo " selected ";
echo ">May</option>";
echo "<option value=\"June\"";
if($month=="June")
echo " selected ";
echo ">June</option>";
echo "<option value=\"July\"";
if($month=="July")
echo " selected ";
echo ">July</option>";
echo "<option value=\"August\"";
if($month=="August")
echo " selected ";
echo ">August</option>";
echo "<option value=\"September\"";
if($month=="September")
echo " selected ";
echo ">September</option>";
echo "<option value=\"October\"";
if($month=="October")
echo " selected ";
echo ">October</option>";
echo "<option value=\"November\"";
if($month=="November")
echo " selected ";
echo ">November</option>";
echo "<option value=\"December\"";
if($month=="December")
echo " selected ";
echo ">December</option>";
echo "</select>
<select name=\"day\">";
for($i = 1; $i <= 31; $i++){
echo "<option value=\"$i\"";
if($i == $today)
echo " selected ";
echo ">$i</option>
";
}
echo "</select>
<select name=\"year\">";
for($i = $current_year; $i < ($current_year + 2); $i++){
echo "<option value=\"$i\"";
if ($year == $i)
echo " selected ";
echo ">$i</option>
";
}
echo "</select>";
?>
What I would like to figure out is how to make a date once selected, dynamically (without my input) get locked out from the next visitors choice or erased or whatever, just so they can't pick the previously selcted dates. Is this even possible from how I populate the select box? Thanks for all the help!
.
select * from table where availability = 1
and then when someone books a date
update table set availabilty 0 where date = whatever
but it would be fairly in depth to do a whole year or more's worth and build it into select boxes
I would think you could trim it down to one months worth on a single form, then have them click into the next month from there and repopulate
if you do too much at once it will get very complicated and take a bunch of time