I can't give you a complete answer on how to tackle this problem, but I could give you some hints on where to look.
First of all I would advise you to work with the PHP timestamp function.
The UNIX timestamp is the number of seconds elapsed since January 1, 1970 at 00:00:00 - you can print it out like this:
<?php echo time(); ?>
This is easier to use than the date functions because with this timestamp you can easily add/substract values (which in your case is a must).
You would have to check how long somebody stays and in which period their stay falls. The first part of this can be solved easily with the timestamp function. Just a matter of addition and substraction. Although if you use a form for people to post their staying-dates, then you should use a function to calculate the difference. I found this on the web somewhere which should do the trick.
// dates are in the form of: 1978-04-26 02:00:00.
function date_diff($str_start, $str_end)
$str_start = strtotime($str_start); // The start date becomes a timestamp
$str_end = strtotime($str_end); // The end date becomes a timestamp
$nseconds = $str_end - $str_start; // Number of seconds between the two dates
$ndays = round($nseconds / 86400); // One day has 86400 seconds
$nseconds = $nseconds % 86400; // The remainder from the operation
$nhours = round($nseconds / 3600); // One hour has 3600 seconds
$nseconds = $nseconds % 3600;
$nminutes = round($nseconds / 60); // One minute has 60 seconds, duh!
$nseconds = $nseconds % 60;
echo $ndays." days, ".$nhours." hours, ".$nminutes." minutes, ".$nseconds."
// test the function with several values
date_diff("1984-10-24 15:32:25", "2003-01-01");
date_diff("2001-10-28 17:32:25", "2003-01-01 12:00:18");
To test which period the person stays (so you can calc. their price) ...uh, good luck on that one!
Can't be too hard though...GOOD luck!