Commented out the connection checking in the connect.php file.
In emar_post.php I removed some testing echo statements and added the mysql_insert_id function so that I can use it with the h_med table. The emar_post.php file is now inserting data correctly into the h_mar table.