Location: PHPKode > projects > PHP File Uploader > form-custom-validation.php
<?php require_once "phpuploader/include_phpuploader.php" ?>
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<title>PHP Upload - Simple Upload with Progress (Custom Validation) </title>
	<link href="demo.css" rel="stylesheet" type="text/css" />
	<div class="demo">
       <h2>Simple Upload with Progress (Custom Validation) </h2>
	<p> A sample demonstrating how to create user-defined validation functions for an upload control. In this example, we defined two validation rules:</p>
	    <li>Maximum file size: 100K</li>
	    <li>Allowed file types: <span style="color:red">jpeg, jpg, gif,png </span></li>
	<p>Click the following button to upload.</p>

			$uploader=new PhpUploader();
			$uploader->InsertText="Upload (Max 100K)";
			//Where'd the files go?
	<script type='text/javascript'>
	function CuteWebUI_AjaxUploader_OnTaskComplete(task)
///		alert(task.FileName + " is uploaded!");
Return current item: PHP File Uploader