Through heavy research, I've been able to create a form similar to a contact form, but it forces a Microsoft Outlook calendar to pop-up and pre-populates the calendar with information filled out. Once it is sent to an email, in outlook it will show up as a calendar event where the person can then choose to accept or decline. Either choice sends an email to the person who submitted, but accept also places it in Outlook's calendar.
My Dilemma

It works but is pretty tacky and instructions are given on once the calendar pops up, you have to hit "Add Attendee" then enter the email address for the person your sending it too. It needs to be one specific email and I can't get it to pre-populate that email. My assumption is because you need to somehow tell VB to automatically add a certain attendee but within the
php code.
Anyways, here's the code that does the magic:
Code:
<?php
header("Content-Type: text/x-vCalendar");
header("Content-Disposition: inline; filename=MyvCalFile.vcs");
$timestamp = strtotime("Ymd");
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$hour = $_POST['hour'];
$minute = $_POST['minute'];
$tomorrow = mktime($hour,$minute, 0, $month, $day+1, $year);
$vCalStart = date("Ymd\THi00", $tomorrow);
$vCalEnd = date("Ymd\THi00", $tomorrow);
print "BEGIN:VCALENDAR\n";
print "VERSION:1.0\n";
print "PRDID:RBC Web Calendar\n";
print "METHD:PUBLISH\n";
print "TZ:-08\n";
print "BEGIN:VEVENT\n";
print "DTSTART:".$vCalStart."\n";
print "DTEND:".$vCalEnd."\n";
print "LOCATION:". ($_POST['hospital']) ."\n";
print "TRANSP:PAQUE\n";
print "UUID:".microtime()."\n";
print "DTSTAMP:".date('Ymd').'T'.date('His')."\n"; // required by Outlook
print "SUMMARY:".($_POST['name']) . "\n"; //subject line shows name field
print "DESCRIPTION;ENCODING=QUOTED-PRINTABLE: " . //description shows all fields
"--Contact Information:-- " . "=0D=0A" .
"Full Name: " . ($_POST['name']) . "=0D=0A" .
'Contact Phone #: ' . ($_POST['phone']) . "=0D=0A" .
'Hospital Scheduling Surgery for: ' . ($_POST['hospital']) . "=0D=0A" .
'--Surgery Information:-- ' . "=0D=0A" .
'Physician: ' . ($_POST['physician']) . "=0D=0A" .
'Type of Surgery: ' . ($_POST['surgery_type']) . "=0D=0A" .
'Side: ' . ($_POST['side']) . "=0D=0A" .
'Special Instructions: ' . ($_POST['special_instructions']) . "\n";
print "BEGIN:VALARM\n";
print "TRIGGER:PT15M\n";
print "ACTIN:DISPLAY\n";
print "END:VALARM\n";
print "END:VEVENT\n";
print "END:VCALENDAR\n";
exit;
?>
I've tried the print "ATTENDEE; mailto:'email@email.com'\n"
but it doesn't work. This gets crazy because at some point VB takes over so my best guess is that I need to tell VB in
php to open a button then populate the ATTNEDEE field but I'm coming up short on how to do that.
Any suggestions would be awesome.