Ok So right now I am using a script called MicroCalendar to setup a client calendar where A client can add an appointment to it but I need to put something into place that makes sure that they cannot overlap appointments..right Now im just saving appointments to txt files with the date of the appointment on them..here is my current code, i have not tried to check the half hour interval yet..
<?php
$myFile = "appointment $_POST[day]-$_POST[month]-$_POST[year].txt";
$fh = fopen($myFile, 'w');
fclose($fh);
$fh1 = fopen($myfile, 'a');
if($_POST[ok])
{
$stringData = "$_POST[name], scheduled an appointment at $_POST[hour]:$_POST[minute] on $_POST[day]-$_POST[month]-$_POST[year]";
$handle = @fopen($file, 'r');
$contents = @fread($handle, filesize($file));
$strPos = strpos( $stringdata , $contents);
if ($strPos!== false)
{
fwrite($fh, $stringData);
fclose($fh);
echo "<br>$_POST[name], scheduled an appointment at $_POST[hour]:$_POST[minute] on $_POST[day]-$_POST[month]-$_POST[year]";
}
?>