Here is the PHP Script I ended up using on this project to make it all work, I called XMLupload.php. Just in case someone has the same questions I had.
<br />
<br /><?<br /?>
require_once("configuration.php");
<br /> $conf=new JConfig();
<br /> $con=mysql_connect($conf->host,$conf->user,$conf->password);
<br /> mysql_select_db('wilder_joomla',$con);
<br />
<br /> define('ADMIN_ROOT_DIR',dirname(__FILE__));
<br /> $xml_uploaddir = ADMIN_ROOT_DIR."/administrator/xml/";
<br /> $pdf_uploaddir = ADMIN_ROOT_DIR."/administrator/pdf/";
<br />
<br /> function random($length)
<br /> {
<br /> $hash =date('YmdHis',time()+8*3600)."_";
<br /> $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
<br /> $max = strlen($chars) - 1;
<br /> mt_srand((double)microtime() * 1000000);
<br /> for($i = 0; $i < $length; $i++)
<br /> {
<br /> $hash .= $chars[mt_rand(0, $max)];
<br /> }
<br /> return $hash;
<br /> }
<br /> function get24hTime($time){
<br /> if(strpos($time, "am")){
<br /> $time = trim(str_replace("am","",$time));
<br /> $temp = split(":",$time);
<br /> return substr("0".$temp[0],strlen($temp[0])-1).":".$temp[1];
<br /> }else if(strpos($time, "pm")){
<br /> $time = trim(str_replace("pm","",$time));
<br /> if(substr($time,0,2)=="12") return $time;
<br /> return strval(intval(substr($time,0,strpos($time,':')))+12).substr($time,strpos($time,':'));
<br /> }
<br /> }
<br />
<br /> $file_path = $xml_uploaddir.random(10).".xml";
<br /> $temp = split("/",$file_path);
<br /> $xml_path = $temp[count($temp)-2]."/".$temp[count($temp)-1];
<br />
<br /> $body = file_get_contents("php://input");
<br /> $fp=fopen($file_path,"w");
<br /> fwrite($fp,$body);
<br /> fclose($fp);
<br />
<br /> $xml=simplexml_load_file($file_path);
<br /> $nodes=$xml->xpath("/form1/P1");
<br /> $xml_groupname=$nodes[0]->group_name[0];
<br /> $xml_groupname=addslashes($xml_groupname);
<br /> $xml_checkin_date=$xml->DateofArrival;
<br /> $xml_checkin_time=get24hTime($xml->ArrivalHour);
<br /> $xml_checkin_date.=" ".$xml_checkin_time.":00";
<br /> $xml_contact_person=$nodes[0]->contact_name[0];
<br /> $xml_contact_email=$nodes[0]->contact_email[0];
<br />
<br /> /*
<br /> print_r("FilePath: $file_path
<br />");
<br /> print_r("GroupName: $xml_groupname
<br />");
<br /> print_r("checkin_date: $xml_checkin_date
<br />");
<br /> print_r("contact_person: $xml_contact_person
<br />");
<br /> print_r("contact_email: $xml_contact_email
<br />");
<br /> */
<br />
<br /> $sql = "insert into jos_xml_files (status,file_path,pdf_path,group_name,checkin_date,contact_person,userid,add_time,email) values (0,'$xml_path','','$xml_groupname','$xml_checkin_date','$xml_contact_person',0,now(),'$xml_contact_email')";
<br /> mysql_query($sql);
<br /> $message ='
<ul class="noindent">
<li>XML file is uploaded successfully.</li>
<li style="list-style: none">';
<br /> mysql_close($con);
<br />?>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></li>
</ul>
<div id="showmsgmain">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<table width="57%" align="center" style="border:1px solid #e5e5e5">
<tr>
<td height="25" bgcolor="#E5E5E5"> Information suggested!</td>
</tr>
<tr>
<td height="122">
<br />
<div style="margin-left: 2em; color:#0066CC;">
<br /> <?php echo $message;?>
<br /></div>
<br /></td>
</tr>
</table>
<br /></div>
<br />
<br />