I think generally to store dates into the database its best to use a timestamp. A timestamp shows the number of seconds that have passed since January 1, 1970 00:00:00 GMT. You get the current timestamp in php by using:
time(); //http://uk.php.net/manual/en/function.time.php
You can convert a date into a timestamp using the following:
mktime('','','',$month,$day,$year); //http://uk.php.net/manual/en/function.mktime.php
And you can convert timestamp into a date by using this:
date('D-M-Y',$timestamp);
Using these functions, get the user to enter in their date in the format you want (DD/MM/YY) using 3 different text boxes like this:
<form action="process.php" method="post">
<input type="text" name="day" value="day"/><br />
<input type="text" name="month" value="month"/><br />
<input type="text" name="year" value="year"/><br />
<input type="submit" /><br />
</form>
then on the next page process it like this:
<?php
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$timestamp = mktime('','','',$month,$day,$year);
//then store the timestamp into the database
?>
Then later if you want to get the timestamp from the database do something like this:
<?php
$get_date = mysql_query('SELECT timestamp FROM table WHERE bookingID = "'.$bookingID.'"');
$timestamp = mysql_fetch_array($get_date);
$timestamp = $date['timestamp'];
$timestamp = date('D-M-Y',$timestamp);
//$timestamp is now a readable version of the timestamp date in the database
?>
the good thing about using timestamps is that if you want to order the items in your database by date you can do it easily. Also if you want to get bookings within the last month, do something like this:
$now = time();
$oneMonthInSeconds = 2629743;
$lastmonth = $now - $oneMonthInSeconds;
$query = 'SELECT * FROM table WHERE timestamp > "'.$lastmonth.'" ';
And no problem about the help - iv had so much help from people like "nav33n" from this forum over the years, its good to give something back. I hope what im saying isnt too complicated - I get a bit excited xD