| 
<?php
/**************************************************/
 /*
 Released by AwesomePHP.com, under the GPL License, a
 copy of it should be attached to the zip file, or
 you can view it on http://AwesomePHP.com/gpl.txt
 */
 /**************************************************/
 
 /*
 Sample Implementation of Form Processing
 ----------------------------------------
 */
 
 require('formProcessor.class.php');
 
 // Create a new processor
 $doForm = new processForum;
 
 // Mail the forum to
 // alllowed separators(, :;) can be mixed together
 $doForm->sendMail('[email protected]');
 
 // Site variables
 $doForm->setSettings('Site Name','[email protected]');
 
 /////////////////////////////////////////////////////////////
 /* File Uploading, can be ignored if no files are uploaded */
 /////////////////////////////////////////////////////////////
 // Do you want to email files to above emails?
 $doForm->mailFiles(true);
 
 // Where to store files uploded
 $doForm->setStorage('../fileStore/');
 
 // Allowed extensions
 // alllowed separators(, :;) can be mixed together
 $doForm->allowedExtensions('jpeg,gif;png:jpg');
 
 // Max file Size KB
 $doForm->maxSize(256000);
 /////////////////////////////////////////////////////////////
 /* End file uploading options */
 /////////////////////////////////////////////////////////////
 
 // Are there any required fields?
 // If so, are they username? email?
 $requirements[] = array('user_name','username');
 $requirements[] = array('friend_email','email');
 $requirements[] = array('comment');
 
 // Check required fields -  Will return error message
 $message = $doForm->requireField($requirements,$_POST);
 
 if($message == NULL){
 // Process the forum, check for required fields
 $doForm->processForm($_POST);
 
 // If everything is OK, go ahead and upload files
 $message = $doForm->uploadFiles($_FILES);
 
 // $message will contain an array with any mistakes with uploads
 // Check if everything is good:
 if(!is_array($message)){ $message = 'Everything is good.';}
 }
 include('sampleCreate.php');
 ?>
 |