Solved

How do I restrict image file size?

Posted on 2009-07-10
11
917 Views
Last Modified: 2012-06-27
How do I restrict the file size a web visitor can upload to 1mb on this website.  I have attached what I think is the relevant code
</select></span>

        <span><label><strong>*File size limited to 1MB per image</strong></label></span>

        <span><label><b>*</b>Headshot Photo:</label><input type="file" class="upload" value="" name="headshot" /></span>

        <span><label><b>*</b>Waist up Photo:</label><input type="file" class="upload" value="" name="waistup" /></span>

        <span><label><b>*</b>Full body Photo:</label><input type="file" class="upload" value="" name="fullbody" /></span>

Open in new window

0
Comment
Question by:Robo2000
  • 5
  • 5
11 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 24827666
The file size is controlled in the form script.  I will post an example for you in a moment.
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 24827674
Follow the "max_file_size" field in this script and in the comments.  Please post back here if you have any questions.  Best, ~Ray
<?php // RAY_upload_example.php

error_reporting(E_ALL);
 

// MANUAL REFERENCE PAGES

// http://docs.php.net/manual/en/features.file-upload.php

// http://docs.php.net/manual/en/features.file-upload.common-pitfalls.php

// http://docs.php.net/manual/en/function.move-uploaded-file.php

// http://docs.php.net/manual/en/function.getimagesize.php
 

// ESTABLISH THE NAME OF THE 'uploads' DIRECTORY

$uploads = 'uploads';
 

// ESTABLISH THE BIGGEST FILE SIZE WE CAN ACCEPT

$max_file_size = '8192000';  // EIGHT MEGABYTE LIMIT ON UPLOADS
 

// ESTABLISH THE KINDS OF FILE EXTENSIONS WE CAN ACCEPT

$file_exts = array('jpg', 'gif', 'png', 'txt', 'pdf');
 

// ESTABLISH THE MAXIMUM NUMBER OF FILES WE CAN UPLOAD

$nf = 3;
 
 
 

// THIS IS A LIST OF THE POSSIBLE ERRORS THAT CAN BE REPORTED IN $_FILES[]["error"]

$errors	= array(

	0 => "Success!",

	1 => "The uploaded file exceeds the upload_max_filesize directive in php.ini",

	2 => "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form",

	3 => "The uploaded file was only partially uploaded",

	4 => "No file was uploaded",

	6 => "Missing a temporary folder",

	7 => "Cannot write file to disk"

);
 
 
 

// IF THERE IS NOTHING IN $_POST, PUT UP THE FORM FOR INPUT

if (empty($_POST))

{

	?>

	<h2>Upload <?=$nf?> file(s)</h2>
 

	<!--

		SOME THINGS TO NOTE ABOUT THIS FORM...

		NOTE THE CHOICE OF ENCTYPE IN THE HTML FORM STATEMENT

		MAX_FILE_SIZE MUST PRECEDE THE FILE INPUT FIELD

		INPUT NAME= IN TYPE=FILE DETERMINES THE NAME YOU FIND IN $_FILES ARRAY

	-->
 

	<form name="UploadForm" enctype="multipart/form-data" action="<?=$_SERVER["REQUEST_URI"]?>" method="POST">

	<input type="hidden" name="MAX_FILE_SIZE" value="<?=$max_file_size?>" />

	<p>

	Find the file(s) you want to upload and click the "Upload" button below.

	</p>
 

	<?php for ($n = 0; $n < $nf; $n++)

		{

			echo "<input name=\"userfile$n\" type=\"file\" size=\"80\" /><br/>\n";

		}

	?>

	<br/>Check this box <input autocomplete="off" type="checkbox" name="overwrite" /> to <b>overwrite</b> existing files.

	<input type="submit" name="_submit" value="Upload" />

	</form>

	<?php

	die();

}

// END OF THE FORM SCRIPT
 
 

else // WE HAVE GOT SOMETHING IN $_POST - RUN THE ACTION SCRIPT

{
 

// THERE IS POST DATA - PROCESS IT

	echo "<h2>Results: File Upload</h2>\n";
 

// ACTIVATE THIS TO SEE WHAT IS COMING THROUGH

//	echo "<pre>"; var_dump($_FILES); var_dump($_POST); echo "</pre>\n";
 

// ITERATE OVER THE CONTENTS OF $_FILES

	foreach ($_FILES as $my_uploaded_file)

	{
 

// SKIP OVER EMPTY SPOTS - NOTHING UPLOADED

		$error_code	= $my_uploaded_file["error"];

		if ($error_code == 4) continue;
 

// SYNTHESIZE THE NEW FILE NAME

		$f_type	= trim(strtolower(end    (explode( '.', basename($my_uploaded_file['name'] )))));

		$f_name	= trim(strtolower(current(explode( '.', basename($my_uploaded_file['name'] )))));

		$my_new_file = getcwd() . '/' . $uploads . '/' . $f_name .'.'. $f_type;

		$my_file     = $uploads . '/' . $f_name .'.'. $f_type;
 

// OPTIONAL TEST FOR ALLOWABLE EXTENSIONS

		if (!in_array($f_type, $file_exts)) die("Sorry, $f_type files not allowed");
 

// IF THERE ARE ERRORS

		if ($error_code != 0)

		{

			$error_message = $errors[$error_code];

			die("Sorry, Upload Error Code: $error_code: $error_message");

		}
 

// GET THE FILE SIZE

		$file_size	= number_format($my_uploaded_file["size"]);
 

// MOVE THE FILE INTO THE DIRECTORY

// IF THE FILE IS NEW

		if (!file_exists($my_new_file))

		{

			if (move_uploaded_file($my_uploaded_file['tmp_name'], $my_new_file))

			{

				$upload_success = 1;

			}

			else

			{

				$upload_success = -1;

			}
 

// IF THE FILE ALREADY EXISTS

		}

		else

		{

			echo "<br/><b><i>$my_file</i></b> already exists.\n";
 

// SHOULD WE OVERWRITE THE FILE? IF NOT

			if (empty($_POST["overwrite"]))

			{

				$upload_success = 0;
 

// IF WE SHOULD OVERWRITE THE FILE, TRY TO MAKE A BACKUP

			}

			else

			{

				$now	= date('Y-m-d');

				$my_bak = $my_new_file . '.' . $now . '.bak';

				if (!copy($my_new_file, $my_bak))

				{

					echo "<br/><b>Attempted Backup Failed!</b>\n";

				}

				if (move_uploaded_file($my_uploaded_file['tmp_name'], $my_new_file))

				{

					$upload_success = 2;

				}

				else

				{

					$upload_success = -1;

				}

			}

		}
 

// REPORT OUR SUCCESS OR FAILURE

		if ($upload_success == 2) { echo "<br/>It has been overwritten.\n"; }

		if ($upload_success == 1) { echo "<br/><b><i>$my_file</i></b> has been saved.\n"; }

		if ($upload_success == 0) { echo "<br/><b>It was NOT overwritten.</b>\n"; }

		if ($upload_success < 0)  { echo "<br/><b>ERROR <i>$my_file</i> NOT SAVED - SEE WARNING FROM move_uploaded_file() COMMAND</b>\n"; }

		if ($upload_success > 0)

		{

			echo "$file_size bytes uploaded.\n";

			if (!chmod ($my_new_file, 0755))

			{

				echo "<br/>chmod(0755) FAILED: fileperms() = ";

				echo substr(sprintf('%o', fileperms($my_new_file)), -4);

			}

			echo "<br/><a href=\"$my_file\">See the file $my_file</a>\n";

		}

// END ITERATOR

	}

}

?>

Open in new window

0
 
LVL 2

Author Comment

by:Robo2000
ID: 24827847
Thanks ray, understand what you have detailed here but do not have a clue how to put it in this code.  Any ideas?

It is big code but the areas are to do with Headshot, Fullbody and WaistUp
<?php

ob_start();

include("db.php");

include('function.php');
 

if(isset($_POST['act'])){

$fname= $_POST['fname'];

$lname= $_POST['lname'];

$address1= $_POST['address1'];

$address2= $_POST['address2'];

$city= $_POST['city'];

$state= $_POST['state'];

$zipcode= $_POST['zipcode'];

$country= $_POST['country'];

$email= $_POST['email'];

$phone_no= $_POST['phone_no'];

$dob= $_POST['month']."-".$_POST['day']."-".$_POST['year'];//$_POST['dob'];  //// year day month

$gender= $_POST['gender'];

$hight= addslashes($_POST['hight1']).$_POST['hight2'];

$weight= $_POST['weight'];

$eyecolor= $_POST['eyecolor'];

$haircolor= $_POST['haircolor'];

$Training= $_POST['note'];

$headshot= $_FILES['headshot']['name'];

$Temphead = $_FILES["headshot"]["tmp_name"];

$Ability= $_POST['ability'];

$Media= $_POST['media'];

$Time= time(); 

$Affi= $_POST['Affiliations'];

$ethnicity=$_POST['ethnicity'];
 

  $NumAff= count($Affi);

    for($R=0; $R < $NumAff; $R++ ){

	    $L= $R +1;

	    if($L != $NumAff) {

		   $Affiliations .= $Affi[$R].",";

		 } else {

		   

		  $Affiliations .= $Affi[$R];

		 }

	}

	

 $Film= $_POST['apnd'];
 

    for($s=1;$s <= $Film ;$s++){

	    

		  $Proj= "project".$s;

		  $Role="role".$s;

		  $Director="director".$s;

		   

	    if($s != $Film ){

		      $FilmProj .= $_POST[$Proj].","; 

			  $FilmRole .= $_POST[$Role].","; 

			  $FilmDir .= $_POST[$Director].","; 

		}else {

		   

		    $FilmProj .= $_POST[$Proj];

			$FilmRole .= $_POST[$Role];

			$FilmDir .= $_POST[$Director];

		}

	}

	

	  

	$TV= $_POST['apndtv'];
 

    for($s=1;$s <= $TV ;$s++){

	    

		  $Proj= "projtv".$s;

		  $Role="roletv".$s;

		  $Director="directv".$s;

		   

	    if($s != $TV ){

		      $TVProj .= $_POST[$Proj].","; 

			  $TVRole .= $_POST[$Role].","; 

			  $TVDir .= $_POST[$Director].","; 

		}else {

		   

		    $TVProj .= $_POST[$Proj];

			$TVRole .= $_POST[$Role];

			$TVDir .= $_POST[$Director];

		}

	}

	

	$Com= $_POST['apndCom'];
 

    for($s=1;$s <= $Com ;$s++){

	    

		  $Proj= "projcom".$s;

		  $Role="rolecom".$s;

		  $Director="direcom".$s;

		   

	    if($s != $Com ){

		      $ComProj .= $_POST[$Proj].","; 

			  $Comole .= $_POST[$Role].","; 

			  $ComDir .= $_POST[$Director].","; 

		}else {

		   

		    $ComProj .= $_POST[$Proj];

			$ComRole .= $_POST[$Role];

			$ComDir .= $_POST[$Director];

		}

	}

	  

	$Thr= $_POST['apndThr'];
 

    for($s=1;$s <= $Thr ;$s++){

	    

		  $Proj= "projthr".$s;

		  $Role="rolethr".$s;

		  $Director="direthr".$s;

		   

	    if($s != $Thr ){

		      $ThrProj .= $_POST[$Proj].","; 

			  $Throle .= $_POST[$Role].","; 

			  $ThrDir .= $_POST[$Director].","; 

		}else {

		   

		    $ThrProj .= $_POST[$Proj];

			$ThrRole .= $_POST[$Role];

			$ThrDir .= $_POST[$Director];

		}

	}

		

if (file_exists("images/HeadShot/".$headshot))

				  {

					 $Msg1=$_FILES["headshot"]["name"] . " already exists.";

					 $Error1="Yes";

				  }				  

				  

$waistup= $_FILES['waistup']['name'];

$Tempwaist = $_FILES["waistup"]["tmp_name"];

if (file_exists("images/Waistup/".$waistup))

				  {

					 $Msg2="&nbsp;&nbsp;&nbsp;&nbsp;".$_FILES["waistup"]["name"] . " already exists.";

					 $Error2="Yes";

				  }				  

$fullbody= $_FILES['fullbody']['name'];

$Tempfull = $_FILES["fullbody"]["tmp_name"];

if (file_exists("images/Fullbody/".$fullbody))

				  {

					 $Msg3="&nbsp;&nbsp;&nbsp;&nbsp;".$_FILES["fullbody"]["name"] . " already exists.";

					 $Error3="Yes";

				  }

				  

				  

				  if(($Error3 !="Yes")&&($Error2 !="Yes")&& ($Error1 !="Yes")){

				  

				                $headshot_image = $_FILES['headshot']["name"];

								  if($headshot_image!='')

								  {

									$extension = substr($headshot_image, strrpos($headshot_image, '.') + 1);

									$headshot_image = "head_".$Time.".".$extension;

								$front = move_uploaded_file($_FILES['headshot']["tmp_name"],"images/HeadShot/".$headshot_image);

									createthumb($headshot_image,"images/HeadShot/","images/HeadShot/Large/",365,476);

									createthumb($headshot_image,"images/HeadShot/","images/HeadShot/",75,75);

								 }	

				   		  

												/*$extension=strstr($_FILES['headshot']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Temphead);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Temphead);

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Temphead);

												}												

												list($width,$height)=getimagesize($Temphead);

												$newwidth=75;

												$newheight=75;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath1 = "head_".$Time.$extension;

												$filename = "images/HeadShot/".$largpath1;

												//imagejpeg($tmp,$filename,100);

												

												

												$extension=strstr($_FILES['headshot']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Temphead);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Temphead);

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Temphead);

												}												

												list($width,$height)=getimagesize($Temphead);

												$newwidth=476;

												$newheight=365;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath1 = "head_".$Time.$extension;

												$filename = "images/HeadShot/Large/".$largpath1;

												//imagejpeg($tmp,$filename,100);

*/				  

				                                

                  //move_uploaded_file($_FILES["headshot"]["tmp_name"], "images/HeadShot/" . $_FILES["headshot"]["name"]);

				  

				                                $waistup_image = $_FILES['waistup']["name"];

								  if($waistup_image!='')

								  {

									$extension = substr($waistup_image, strrpos($waistup_image, '.') + 1);

									$waistup_image = "Waist_".$Time.".".$extension;

								$front = move_uploaded_file($_FILES['waistup']["tmp_name"],"images/Waistup/".$waistup_image);

									createthumb($waistup_image,"images/Waistup/","images/Waistup/Large/",365,476);

									createthumb($waistup_image,"images/Waistup/","images/Waistup/",75,75);

								 }	

												

												

												/*$extension=strstr($_FILES['waistup']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Tempwaist);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Tempwaist);

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Tempwaist);

												}												

												list($width,$height)=getimagesize($Tempwaist);

												$newwidth=75;

												$newheight=75;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath2 = "waist".$Time.$extension;

												$filename = "images/Waistup/".$largpath2;

												//imagejpeg($tmp,$filename,100);

												

												$extension=strstr($_FILES['waistup']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Tempwaist);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Tempwaist);

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Tempwaist);

												}												

												list($width,$height)=getimagesize($Tempwaist);

												$newwidth=476;

												$newheight=365;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath2 = "waist".$Time.$extension;

												$filename = "images/Waistup/Large/".$largpath2;

												//imagejpeg($tmp,$filename,100);											

												

*/												

				  //move_uploaded_file($_FILES["waistup"]["tmp_name"], "images/Waistup/" . $_FILES["waistup"]["name"]);

				                                //$fullbody= $_FILES['fullbody']['name'];

												//$Tempfull = $_FILES["fullbody"]["tmp_name"];

												

												$fullbody_image = $_FILES['fullbody']["name"];

								  if($fullbody_image!='')

								  {

									$extension = substr($fullbody_image, strrpos($fullbody_image, '.') + 1);

									$fullbody_image = "Full_".$Time.".".$extension;

								$front = move_uploaded_file($_FILES['fullbody']["tmp_name"],"images/Fullbody/".$fullbody_image);

									createthumb($fullbody_image,"images/Fullbody/","images/Fullbody/Large/",365,476);

									createthumb($fullbody_image,"images/Fullbody/","images/Fullbody/",75,75);

								 }	

												

												

												

												

												/*$extension=strstr($_FILES['fullbody']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Tempfull);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Tempfull);
 

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Tempfull);

												}												

												list($width,$height)=getimagesize($Tempfull);

												$newwidth=75;

												$newheight=75;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath3 = "full".$Time.$extension;

												$filename = "images/Fullbody/".$largpath3;

												//imagejpeg($tmp,$filename,100);

												

												

												$extension=strstr($_FILES['fullbody']['name'],".");												

												if($extension==".jpg" || $extension==".jpeg" || $extension==".JPG" || $extension==".JPEG"){

												$src = imagecreatefromjpeg($Tempfull);

												}

												if($extension==".gif" || $extension==".GIF"){

												$src = imagecreatefromgif($Tempfull);
 

												}

												if($extension==".png" || $extension==".PNG"){

												$src = imagecreatefrompng($Tempfull);

												}												

												list($width,$height)=getimagesize($Tempfull);

												$newwidth=476;

												$newheight=365;

												$tmp=imagecreatetruecolor($newwidth,$newheight);												

												imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);

												$largpath3 = "full".$Time.$extension;

												$filename = "images/Fullbody/Large/".$largpath3;

												//imagejpeg($tmp,$filename,100);

				  //move_uploaded_file($_FILES["fullbody"]["tmp_name"], "images/Fullbody/" . $_FILES["fullbody"]["name"]);

*/
 

  $Insrt="INSERT INTO `register` (`fname`, `lname`, `address1`, `address2`, `city`, `state`, `zipcode`, `country`, `email`, `phone_no`, `dob`, `gender`, `hight`, `weight`, `eyecolor`, `haircolor`, `headshot`, `waistup`, `fullbody`, `notes`,`registration_date`,`ability`,`media`,`ethnicity`) VALUES ( '$fname', '$lname', '$address1', '$address2', '$city', '$state', '$zipcode', '$country', '$email', '$phone_no', '$dob', '$gender', '$hight', '$weight', '$eyecolor', '$haircolor', '$headshot_image', '$waistup_image', '$fullbody_image', '$Training',now(), '$Ability', '$Media','$ethnicity')";
 

    $ResInsrt= mysql_query($Insrt) or die(mysql_error());

    $Rid= mysql_insert_id();

   

   ////////////////////////////////////// Code for experiance section //////////////////////////////

   

      $InsrtExp="INSERT INTO `experience` (`reg_id` ,`film_proj` ,`film_role` ,`film_director` ,`tv_proj` ,`tv_role` ,`tv_director` ,`comr_proj` ,`comr_role` ,`comr_director` ,`tht_proj` ,`tht_role` ,`tht_director` ,`affiliations`)

VALUES ('$Rid', '$FilmProj', '$FilmRole', '$FilmDir', '$TVProj', '$TVRole', '$TVDir', '$ComProj', '$ComRole', '$ComDir', '$ThrProj', '$ThrRole', '$ThrDir', '$Affiliations')";

     

	   $ResExp= mysql_query($InsrtExp) or die(mysql_error());

   

	}

       

	   

	   ////////////////////////////////////// Code for multiple images upload //////////////////////////////

	   ///  OtherPhoto  apndPhoto

	             $PhotoNum= $_POST['apndPhoto'];

	                			    

						      for($p=1;$p <=$PhotoNum; $p++){

					  

					                     $OtherPhoto = "OtherPhoto".$p;

										 $ImgNam=rand(0,1000);

																						

									  $front_image = $_FILES[$OtherPhoto]["name"];

								if($front_image!='')

								{

									$extension = substr($front_image, strrpos($front_image, '.') + 1);

									$front_image = $ImgNam."Gal.".$extension;

									$front = move_uploaded_file($_FILES[$OtherPhoto]["tmp_name"],"images/Gallary/".$front_image);

									createthumb($front_image,"images/Gallary/","images/Gallary/Large/",365,476);

									createthumb($front_image,"images/Gallary/","images/Gallary/",75,75);

									$InsrtImg="INSERT INTO `gallary_image`(`reg_id`,`img_name`)VALUES ('$Rid', '$front_image')";

									$ResInsrtImg= mysql_query($InsrtImg) or die(mysql_error());

										}	

											  

										}

	   

	   

	   

}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="X-UA-Compatible" content="IE=7">

<title>The Talent House L.A.</title>

<link href="master.css" rel="stylesheet" type="text/css" />

<script language="javascript">

                         

function AddFilm(){

var k = document.form.apnd.value;

var i=1;

var j=parseInt(k)+parseInt(i);

var temp="";

document.form.apnd.value=j;

for (var x=2; x<=k;x++){

    var Project=document.getElementById('project'+x).value;

	var Role=document.getElementById('role'+x).value;

    var Director=document.getElementById('director'+x).value;

	temp=temp+"<span><label>Project</label><input type='text' class='input' name=project"+x+" value='"+Project+"' id=project"+x+" /></span><span><label>Role</label><input type='text' name=role"+x+" class='input' id=role"+x+" value='"+Role+"' /></span><span><label>Producer/Director</label><input type='text' class='input' name=director"+x+" id=director"+x+" value='"+Director+"' /></span>";

}

document.getElementById('my_div').innerHTML = temp+"<br><br><span><label>Project</label><input type='text' class='input' name=project"+j+" id=project"+j+" /></span><span><label>Role</label><input type='text' name=role"+j+" id=role"+j+" class='input' /></span><span><label>Producer/Director</label><input type='text' class='input' name=director"+j+" id=director"+j+" /></span>";

}

function AddTv(){

var k = document.form.apndtv.value;

var i=1;

var j=parseInt(k)+parseInt(i);

var temp="";

document.form.apndtv.value=j;

for (var x=2; x<=k;x++){

    var Projtv=document.getElementById('projtv'+x).value;

	var Roletv=document.getElementById('roletv'+x).value;

    var Directv=document.getElementById('directv'+x).value;

	

	temp=temp+"<span><label>Project</label><input type='text' class='input' name=projtv"+x+" value='"+Projtv+"' id=projtv"+x+" /></span><span><label>Role</label><input type='text' name=roletv"+x+" class='input' id=roletv"+x+" value='"+Roletv+"' /></span><span><label>Producer/Director</label><input type='text' class='input' name=directv"+x+" id=directv"+x+" value='"+Directv+"' /></span>";

	}

document.getElementById('tv_div').innerHTML = temp+"<br><br><span><label>Project</label><input type='text' class='input' name=projtv"+j+" id=projtv"+j+" /></span><span><label>Role</label><input type='text' name=roletv"+j+" id=roletv"+j+" class='input' /></span><span><label>Producer/Director</label><input type='text' class='input' name=directv"+j+" id=directv"+j+" /></span>";

  

}

   

function AddComm()

{
 

var k = document.form.apndCom.value;

var i=1;

var j=parseInt(k)+parseInt(i);

var temp="";

document.form.apndCom.value=j;

for (var x=2; x<=k;x++){

    var Projcom=document.getElementById('projcom'+x).value;

	var Rolecom=document.getElementById('rolecom'+x).value;

    var Direcom=document.getElementById('direcom'+x).value;

	  

	   temp=temp+"<span><label>Project</label><input type='text' class='input' name=projcom"+x+" value='"+Projcom+"' id=projcom"+x+" /></span><span><label>Role</label><input type='text' name=rolecom"+x+" class='input' id=rolecom"+x+" value='"+Rolecom+"' /></span><span><label>Producer/Director</label><input type='text' class='input' name=direcom"+x+" id=direcom"+x+" value='"+Direcom+"' /></span>";

	

	}

document.getElementById('com_div').innerHTML = temp +"<br><br><span><label>Project</label><input type='text' class='input' name=projcom"+j+" id=projcom"+j+" /></span><span><label>Role</label><input type='text' name=rolecom"+j+" id=rolecom"+j+" class='input' /></span><span><label>Producer/Director</label><input type='text' class='input' name=direcom"+j+" id=direcom"+j+" /></span>";

  

}
 

function AddTeatre()

{
 

var k = document.form.apndThr.value;

var i=1;

var j=parseInt(k)+parseInt(i);

var temp="";

document.form.apndThr.value=j;
 

for (var x=2; x<=k;x++){

    var Projthr=document.getElementById('projthr'+x).value;

	var Rolethr=document.getElementById('rolethr'+x).value;

    var Direthr=document.getElementById('direthr'+x).value;

	  

	   temp=temp+"<span><label>Project</label><input type='text' class='input' name=projthr"+x+" value='"+Projthr+"' id=projthr"+x+" /></span><span><label>Role</label><input type='text' name=rolethr"+x+" class='input' id=rolethr"+x+" value='"+Rolethr+"' /></span><span><label>Producer/Director</label><input type='text' class='input' name=direthr"+x+" id=direthr"+x+" value='"+Direthr+"' /></span>";

	

	}
 

document.getElementById('thr_div').innerHTML = temp+"<br><br><span><label>Project</label><input type='text' class='input' name=projthr"+j+" id=projthr"+j+" /></span><span><label>Role</label><input type='text' name=rolethr"+j+" id=rolethr"+j+" class='input' /></span><span><label>Producer/Director</label><input type='text' class='input' name=direthr"+j+" id=direthr"+j+" /></span>";

  

}
 

function createNew(n,t,c){

	//counter NEXT

	alert(n);

	alert(t);

	alert(c);

	

	c2 = c+1;

	

	//Start: Make input

	newer = "<input name='"+n+"_"+c2+"' type='file' onclick='javascript:createNew(\""+n+"\",this,"+c2+");' />";

	

	//End: New div for next

	newer += "<div id='Extras"+n+c2+"'>&nbsp;</div>";

	

	//Outputs whats created

	document.getElementById('Extras'+n+c).innerHTML += newer+"<br />";

	

	//Updates hidden counter

	document.getElementById(n+"count").value = c;

	

	//remove onclick

	t.onclick = "";

	

}
 
 

function AddPhoto()

{
 

var k = document.form.apndPhoto.value;

var i=1;

var j=parseInt(k)+parseInt(i);

document.form.apndPhoto.value=j;

var temp="";
 

/*for (var x=2; x<=k;x++){

    var OtherPhoto=document.getElementById('OtherPhoto'+x).value;

	  alert(OtherPhoto);

	   temp=temp+"<span><label>Gallery Photo:</label><input type='file' class='upload' name=OtherPhoto"+x+"  id=OtherPhoto"+x+" value="+OtherPhoto+" /></span>";

	

	}

*/

document.getElementById('photo_div').innerHTML = document.getElementById('photo_div').innerHTML+"<br><br><span><label>Gallery Photo:</label><input type='file' class='upload' name=OtherPhoto"+j+" id=OtherPhoto"+j+" /></span>";

   

}   

</script> 

<script language="javascript" type="text/javascript">  

function trim(str)

{ // alert("Hello");

   return str.replace(/^\s+|\s+$/g,'');

}

function ChkForm(){

var ChkReg=document.form;
 

   if(trim(ChkReg.fname.value)==""){

   alert("Please enter first name.");

   ChkReg.fname.focus();

   return false;   

  }

   if(trim(ChkReg.lname.value)==""){

   alert("Please enter last name.");

   ChkReg.lname.focus();

   return false;   

  }

  if(trim(ChkReg.address1.value)==""){

   alert("Please enter address.");

   ChkReg.address1.focus();

   return false;   

  }

  if(trim(ChkReg.city.value)==""){

   alert("Please enter city name.");

   ChkReg.city.focus();

   return false;   

  }

  if(trim(ChkReg.state.value)==""){

   alert("Please enter state name.");

   ChkReg.state.focus();

   return false;   

  }

  if(trim(ChkReg.zipcode.value)==""){

   alert("Please enter zipcode.");

   ChkReg.zipcode.focus();

   return false;   

  }

  if(trim(ChkReg.country.value)==0){

   alert("Please select country.");

   return false;   

  }

  var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

             //var address = document.forms[form_id].elements[email].value;

    if(reg.test(ChkReg.email.value) == false)

	   {

        alert("Please enter email address.");

        ChkReg.email.focus();

        return false;   

      }

  

  if(trim(ChkReg.phone_no.value)==""){

   alert("Please enter phone number.");

   ChkReg.phone_no.focus();

   return false;   

  }

  /*if(trim(ChkReg.dob.value)==""){

   alert("Please enter birth date.");

   ChkReg.dob.focus();

   return false;   

  }*/

   if(ChkReg.month.value=="0")

  /* if(ChkReg.dob.value=="")*/{

   alert("Please select birth month.");   

   return false;   

  }

  if(ChkReg.day.value=="0") 

  /* if(ChkReg.dob.value=="")*/{

   alert("Please select birth day.");   

   return false;   

  }

  if(ChkReg.year.value=="0")

  /* if(ChkReg.dob.value=="")*/{

   alert("Please select birth year.");   

   return false;   

  }

  function checkRadio (frmName, rbGroupName) {

 var radios = document[frmName].elements[rbGroupName];

 for (var i=0; i <radios.length; i++) {

  if (radios[i].checked) {

   return true;

  }

 }

 return false;

}
 

 if (!checkRadio("form","gender")){

  alert("Please select gender.");

  return false;

  }

  

  if(ChkReg.hight1.value==0){

   alert("Please select hight.");

   return false;   

  }

  if(ChkReg.weight.value==0){

   alert("Please select weight.");

   return false;   

  }

  if(trim(ChkReg.eyecolor.value)==""){

   alert("Please enter eye color.");

   ChkReg.eyecolor.focus();

   return false;   

  }

  if(trim(ChkReg.haircolor.value)==""){

   alert("Please enter hair color.");

   ChkReg.haircolor.focus();

   return false;   

  }

  

  if(trim(ChkReg.headshot.value)==""){

   alert("Please upload headshot photo.");

   ChkReg.headshot.focus();

   return false;   

  }

  

   if(trim(ChkReg.waistup.value)==""){

   alert("Please upload waistup photo.");

   ChkReg.waistup.focus();

   return false;   

  }

  if(trim(ChkReg.fullbody.value)==""){

   alert("Please upload fullbody photo.");

   ChkReg.fullbody.focus();

   return false;   

  }

 

 	var a=confirm("Are you sure you wish to proceed with these details?");

	if (a)

	{

	alert("Thank you for your submission!"); 

	return true;      

	}

	else

	{

		 ChkReg.fullbody.focus();

   return false;   

	} 

 

}
 
 

////////////////////////////////date validaton/////////////////

 var dtCh= "/";

var minYear=1900;

var maxYear=2100;
 

function isInteger(s){

	var i;

    for (i = 0; i < s.length; i++){   

        // Check that current character is number.

        var c = s.charAt(i);

        if (((c < "0") || (c > "9"))) return false;

    }

    // All characters are numbers.

    return true;

}
 

function stripCharsInBag(s, bag){

	var i;

    var returnString = "";

    // Search through string's characters one by one.

    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++){   

        var c = s.charAt(i);

        if (bag.indexOf(c) == -1) returnString += c;

    }

    return returnString;

}
 

function daysInFebruary (year){

	// February has 29 days in any year evenly divisible by four,

    // EXCEPT for centurial years which are not also divisible by 400.

    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );

}

function DaysArray(n) {

	for (var i = 1; i <= n; i++) {

		this[i] = 31

		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}

		if (i==2) {this[i] = 29}

   } 

   return this

}
 

function isDate(dtStr){

	var daysInMonth = DaysArray(12)

	var pos1=dtStr.indexOf(dtCh)

	var pos2=dtStr.indexOf(dtCh,pos1+1)

	var strMonth=dtStr.substring(0,pos1)

	var strDay=dtStr.substring(pos1+1,pos2)

	var strYear=dtStr.substring(pos2+1)

	strYr=strYear

	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)

	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)

	for (var i = 1; i <= 3; i++) {

		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)

	}

	month=parseInt(strMonth)

	day=parseInt(strDay)

	year=parseInt(strYr)

	if (pos1==-1 || pos2==-1){

		alert("The date format should be : mm/dd/yyyy")

		return false;

	}

	if (strMonth.length<1 || month<1 || month>12){

		alert("Please enter a valid month")

		return false;

	}

	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){

		alert("Please enter a valid day")

		return false;

	}

	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){

		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)

		return false;

	}

	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){

		alert("Please enter a valid date");

		return false;

	}

return true;
 

} 

////////////////////////////////////////////////////////
 

</script>

</head>

<body onload="document.getElementById('subm').className='selected';">

<div id="wrap">

  <div id="container02">

   <? 

	  include("top.php");

	  include("right_logo.php");

 	  ?>

        <form name="form" action="" method="post" enctype="multipart/form-data">

		<div id="submissions"><p><strong><u>submission process</u></strong><br /><br />
 

Please note we accept submissions through our website ONLY.<br /><br />
 

Unfortunately, materials sent through postal service will be thrown away unopened and will not be returned.<br /><br />
 

Please allow at least two weeks for your email submission to be reviewed.<br /><br />
 

Please <strong>do not call</strong> about the status of your submission, we will contact you if were interested in setting up a meeting to discuss representation.<br /><br />
 

Thank you for adhering to these guidelines.

</p>

	<div class="data01">

    	<span><label><b>*</b>First Name:</label><input type="text" value="" class="input"  name="fname" /></span>

        <span><label><b>*</b>Last Name:</label><input type="text" value="" class="input" name="lname" /></span>

        <span><label><b>*</b>Street Address:</label><input type="text" value="" class="input" name="address1" /></span>

        <span><input type="text" value="" class="input" name="address2" /></span><span>

        <label><b>*</b>City:</label><input type="text" value="" class="input" name="city" /></span>

        <span><label><b>*</b>State:</label><input type="text" value="" class="input" name="state" />

		<!--<select class="input">

        											<option value="">Select -</option>

        </select>--></span>

        <span><label><b>*</b>ZIP Code:</label><input type="text" value="" class="input" name="zipcode" /></span>

        <span><label><b>*</b>Country:</label><select class="input" name="country">

        											<option value="0">Select -</option>

					<option value="Afghanistan">Afghanistan</option>

                    <option value="Albania" >Albania</option>

                    <option value="Algeria" >Algeria</option>

                    <option value="American Samoa">American Samoa</option>

                    <option value="Andorra">Andorra</option>

                    <option value="Angola">Angola</option>

                    <option value="Anguilla">Anguilla</option>

                    <option value="Antarctica">Antarctica</option>

                    <option value="Antigua And Barbuda">Antigua And Barbuda</option>

                    <option value="Argentina">Argentina</option>

                    <option value="Armenia">Armenia</option>

                    <option value="Aruba">Aruba</option>

                    <option value="Australia">Australia</option>

                    <option value="Austria">Austria</option>

                    <option value="Azerbaijan">Azerbaijan</option>

                    <option value="Bahamas">Bahamas</option>

                    <option value="Bahrain">Bahrain</option>

                    <option value="Bangladesh">Bangladesh</option>

                    <option value="Barbados">Barbados</option>

                    <option value="Belarus">Belarus</option>

                    <option value="Belgium">Belgium</option>

                    <option value="Belize">Belize</option>

                    <option value="Benin">Benin</option>

                    <option value="Bermuda">Bermuda</option>

                    <option value="Bhutan">Bhutan</option>

                    <option value="Bolivia">Bolivia</option>

                    <option value="Bosnia And Herzegovina" >Bosnia And Herzegovina</option>

                    <option value="Botswana" >Botswana</option>

                    <option value="Bouvet Island">Bouvet Island</option>

                    <option value="Brazil">Brazil</option>

                    <option value="British Indian Ocean Territory" >

					British Indian Ocean Territory</option>

                    <option value="Brunei Darussalam" >Brunei Darussalam</option>

                    <option value="Bulgaria" <?php if($country=='Bulgaria'){echo 'selected="selected"';}?>>Bulgaria</option>

                    <option value="Burkina Faso" <?php if($country=='Burkina Faso'){echo 'selected="selected"';}?>>Burkina Faso</option>

                    <option value="Burundi" <?php if($country=='Burundi'){echo 'selected="selected"';}?>>Burundi</option>

                    <option value="Cambodia" <?php if($country=='Cambodia'){echo 'selected="selected"';}?>>Cambodia</option>

                    <option value="Cameroon" <?php if($country=='Cameroon'){echo 'selected="selected"';}?>>Cameroon</option>

                    <option value="Canada" <?php if($country=='Canada'){echo 'selected="selected"';}?>>Canada</option>

                    <option value="Cape Verde" <?php if($country=='Cape Verde'){echo 'selected="selected"';}?>>Cape Verde</option>

                    <option value="Cayman Islands" <?php if($country=='Cayman Islands'){echo 'selected="selected"';}?>>Cayman Islands</option>

                    <option value="Central African Republic" <?php if($country=='Central African Republic'){echo 'selected="selected"';}?>>Central African Republic					</option>

                    <option value="Chad" <?php if($country=='Chad'){echo 'selected="selected"';}?>>Chad</option>

                    <option value="Chile" <?php if($country=='Chile'){echo 'selected="selected"';}?>>Chile</option>

                    <option value="China" <?php if($country=='China'){echo 'selected="selected"';}?>>China</option>

                    <option value="Christmas Island" <?php if($country=='Christmas Island'){echo 'selected="selected"';}?>>Christmas Island</option>

                    <option value="Cocos (Keeling) Islands" <?php if($country=='Cocos (Keeling) Islands'){echo 'selected="selected"';}?>>Cocos (Keeling) Islands					</option>

                    <option value="Colombia" <?php if($country=='Colombia'){echo 'selected="selected"';}?>>Colombia</option>

                    <option value="Comoros" <?php if($country=='Comoros'){echo 'selected="selected"';}?>>Comoros</option>

                    <option value="Congo" <?php if($country=='Congo'){echo 'selected="selected"';}?>>Congo</option>

                    <option value="Cook Islands" <?php if($country=='Cook Islands'){echo 'selected="selected"';}?>>Cook Islands</option>

                    <option value="Costa Rica" <?php if($country=='Costa Rica'){echo 'selected="selected"';}?>>Costa Rica</option>

                    <option value="Cote d'Ivoire" <?php if($country=="Cote d'Ivoire"){echo 'selected="selected"';}?>>Cote d'Ivoire</option>

                    <option value="Croatia" <?php if($country=='Croatia'){echo 'selected="selected"';}?>>Croatia</option>

                    <option value="Cuba" <?php if($country=='Cuba'){echo 'selected="selected"';}?>>Cuba</option>

                    <option value="Cyprus" <?php if($country=='Cyprus'){echo 'selected="selected"';}?>>Cyprus</option>

                    <option value="Czech Republic" <?php if($country=='Czech Republic'){echo 'selected="selected"';}?>>Czech Republic</option>

                    <option value="Denmark" <?php if($country=='Denmark'){echo 'selected="selected"';}?>>Denmark</option>

                    <option value="Djibouti" <?php if($country=='Djibouti'){echo 'selected="selected"';}?>>Djibouti</option>

                    <option value="Dominica" <?php if($country=='Dominica'){echo 'selected="selected"';}?>>Dominica</option>

                    <option value="Dominican Republic" <?php if($country=='Dominican Republic'){echo 'selected="selected"';}?>>Dominican Republic</option>

                    <option value="East Timor" <?php if($country=='East Timor'){echo 'selected="selected"';}?>>East Timor</option>

                    <option value="Ecuador" <?php if($country=='Ecuador'){echo 'selected="selected"';}?>>Ecuador</option>
 

                    <option value="Egypt" <?php if($country=='Egypt'){echo 'selected="selected"';}?>>Egypt</option>

                    <option value="El Salvador" <?php if($country=='El Salvador'){echo 'selected="selected"';}?>>El Salvador</option>

                    <option value="Equatorial Guinea" <?php if($country=='Equatorial Guinea'){echo 'selected="selected"';}?>>Equatorial Guinea</option>

                    <option value="Eritrea" <?php if($country=='Eritrea'){echo 'selected="selected"';}?>>Eritrea</option>

                    <option value="Estonia" <?php if($country=='Estonia'){echo 'selected="selected"';}?>>Estonia</option>

                    <option value="Ethiopia" <?php if($country=='Ethiopia'){echo 'selected="selected"';}?>>Ethiopia</option>

                    <option value="Falkland Islands (Malvinas)" <?php if($country=='Falkland Islands (Malvinas)'){echo 'selected="selected"';}?>>

					Falkland Islands (Malvinas)</option>

                    <option value="Faroe Islands" <?php if($country=='Faroe Islands'){echo 'selected="selected"';}?>>Faroe Islands</option>

                    <option value="Fiji" <?php if($country=='Fiji'){echo 'selected="selected"';}?>>Fiji</option>

                    <option value="Finland" <?php if($country=='Finland'){echo 'selected="selected"';}?>>Finland</option>

                    <option value="France" <?php if($country=='France'){echo 'selected="selected"';}?>>France</option>

                    <option value="French Guiana" <?php if($country=='French Guiana'){echo 'selected="selected"';}?>>French Guiana</option>

                    <option value="French Polynesia" <?php if($country=='French Polynesia'){echo 'selected="selected"';}?>>French Polynesia</option>

                    <option value="French Southern Territories" <?php if($country=='French Southern Territories'){echo 'selected="selected"';}?>>

					French Southern Territories</option>

                    <option value="Gabon" <?php if($country=='Gabon'){echo 'selected="selected"';}?>>Gabon</option>

                    <option value="Gambia" <?php if($country=='Gambia'){echo 'selected="selected"';}?>>Gambia</option>

                    <option value="Georgia" <?php if($country=='Georgia'){echo 'selected="selected"';}?>>Georgia</option>

                    <option value="Germany" <?php if($country=='Germany'){echo 'selected="selected"';}?>>Germany</option>

                    <option value="Ghana" <?php if($country=='Ghana'){echo 'selected="selected"';}?>>Ghana</option>

                    <option value="Gibraltar" <?php if($country=='Gibraltar'){echo 'selected="selected"';}?>>Gibraltar</option>

                    <option value="Greece" <?php if($country=='Greece'){echo 'selected="selected"';}?>>Greece</option>

                    <option value="GL" <?php if($country=='GL'){echo 'selected="selected"';}?>>Greenland</option>

                    <option value="Greenland" <?php if($country=='Greenland'){echo 'selected="selected"';}?>>Grenada</option>

                    <option value="Guadeloupe" <?php if($country=='Guadeloupe'){echo 'selected="selected"';}?>>Guadeloupe</option>

                    <option value="Guam" <?php if($country=='Guam'){echo 'selected="selected"';}?>>Guam</option>

                    <option value="Guatemala" <?php if($country=='Guatemala'){echo 'selected="selected"';}?>>Guatemala</option>                    

					<option value="Guernsey" <?php if($country=='Guernsey'){echo 'selected="selected"';}?>>Guernsey</option>

					<option value="Guinea" <?php if($country=='Guinea'){echo 'selected="selected"';}?>>Guinea</option>

                    <option value="Guinea-Bissau" <?php if($country=='Guinea-Bissau'){echo 'selected="selected"';}?>>Guinea-Bissau</option>

                    <option value="Guyana" <?php if($country=='Guyana'){echo 'selected="selected"';}?>>Guyana</option>

                    <option value="Haiti" <?php if($country=='Haiti'){echo 'selected="selected"';}?>>Haiti</option>

                    <option value="Heard And McDonald Islands" <?php if($country=='Heard And McDonald Islands'){echo 'selected="selected"';}?>>

					Heard And McDonald Islands</option>

                    <option value="Holy See (Vatican City State)" <?php if($country=='Holy See (Vatican City State)'){echo 'selected="selected"';}?>>

					Holy See (Vatican City State)</option>

                    <option value="Honduras" <?php if($country=='Honduras'){echo 'selected="selected"';}?>>Honduras</option>

                    <option value="Hong Kong" <?php if($country=='Hong Kong'){echo 'selected="selected"';}?>>Hong Kong</option>

                    <option value="Hungary" <?php if($country=='Hungary'){echo 'selected="selected"';}?>>Hungary</option>

                    <option value="Iceland" <?php if($country=='Iceland'){echo 'selected="selected"';}?>>Iceland</option>

                    <option value="India" <?php if($country=='India'){echo 'selected="selected"';}?>>India</option>

                    <option value="Indonesia" <?php if($country=='Indonesia'){echo 'selected="selected"';}?>>Indonesia</option>

                    <option value="Iran (Islamic Republic Of)" <?php if($country=='Iran (Islamic Republic Of)'){echo 'selected="selected"';}?>>

					Iran (Islamic Republic Of)</option>

                    <option value="Iraq" <?php if($country=='Iraq'){echo 'selected="selected"';}?>>Iraq</option>

                    <option value="Ireland" <?php if($country=='Ireland'){echo 'selected="selected"';}?>>Ireland</option>                    

					<option value="Isle of Man" <?php if($country=='Isle of Man'){echo 'selected="selected"';}?>>Isle of Man</option>

					<option value="Israel" <?php if($country=='Israel'){echo 'selected="selected"';}?>>Israel</option>

                    <option value="Italy" <?php if($country=='Italy'){echo 'selected="selected"';}?>>Italy</option>

                    <option value="Jamaica" <?php if($country=='Jamaica'){echo 'selected="selected"';}?>>Jamaica</option>

                    <option value="Japan" <?php if($country=='Japan'){echo 'selected="selected"';}?>>Japan</option>                    

					<option value="Jersey" <?php if($country=='Jersey'){echo 'selected="selected"';}?>>Jersey</option>

					<option value="Jordan" <?php if($country=='Jordan'){echo 'selected="selected"';}?>>Jordan</option>

                    <option value="Kazakhstan" <?php if($country=='Kazakhstan'){echo 'selected="selected"';}?>>Kazakhstan</option>

                    <option value="Kenya" <?php if($country=='Kenya'){echo 'selected="selected"';}?>>Kenya</option>

                    <option value="Kiribati" <?php if($country=='Kiribati'){echo 'selected="selected"';}?>>Kiribati</option>

                    <option value="Korea, Democratic People's Republic" <?php if($country=="Korea, Democratic People's Republic"){echo 'selected="selected"';}?>>

					Korea, Democratic People's Republic</option>

                    <option value="Korea, Republic Of" <?php if($country=='Korea, Republic Of'){echo 'selected="selected"';}?>>Korea, Republic Of</option>

                    <option value="Kuwait" <?php if($country=='Kuwait'){echo 'selected="selected"';}?>>Kuwait</option>

                    <option value="Kyrgyzstan" <?php if($country=='Kyrgyzstan'){echo 'selected="selected"';}?>>Kyrgyzstan</option>

                    <option value="Lao People's Democratic Republic" <?php if($country=="Lao People's Democratic Republic"){echo 'selected="selected"';}?>>

					Lao People's Democratic Republic</option>

                    <option value="Latvia" <?php if($country=='Latvia'){echo 'selected="selected"';}?>>Latvia</option>

                    <option value="Lebanon" <?php if($country=='Lebanon'){echo 'selected="selected"';}?>>Lebanon</option>

                    <option value="Lesotho" <?php if($country=='Lesotho'){echo 'selected="selected"';}?>>Lesotho</option>

                    <option value="Liberia" <?php if($country=='Liberia'){echo 'selected="selected"';}?>>Liberia</option>

                    <option value="Libyan Arab Jamahiriya" <?php if($country=='Libyan Arab Jamahiriya'){echo 'selected="selected"';}?>>

					Libyan Arab Jamahiriya</option>

                    <option value="Liechtenstein" <?php if($country=='Liechtenstein'){echo 'selected="selected"';}?>>Liechtenstein</option>

                    <option value="Lithuania" <?php if($country=='Lithuania'){echo 'selected="selected"';}?>>Lithuania</option>

                    <option value="Luxembourg" <?php if($country=='Luxembourg'){echo 'selected="selected"';}?>>Luxembourg</option>

                    <option value="Macau" <?php if($country=='Macau'){echo 'selected="selected"';}?>>Macau</option>

                    <option value="Macedonia" <?php if($country=='Macedonia'){echo 'selected="selected"';}?>>Macedonia</option>

                    <option value="Madagascar" <?php if($country=='Madagascar'){echo 'selected="selected"';}?>>Madagascar</option>

                    <option value="Malawi" <?php if($country=='Malawi'){echo 'selected="selected"';}?>>Malawi</option>

                    <option value="Malaysia" <?php if($country=='Malaysia'){echo 'selected="selected"';}?>>Malaysia</option>

                    <option value="Maldives" <?php if($country=='Maldives'){echo 'selected="selected"';}?>>Maldives</option>

                    <option value="Mali" <?php if($country=='Mali'){echo 'selected="selected"';}?>>Mali</option>

                    <option value="Malta" <?php if($country=='Malta'){echo 'selected="selected"';}?>>Malta</option>

                    <option value="Marshall Islands" <?php if($country=='Marshall Islands'){echo 'selected="selected"';}?>>Marshall Islands</option>

                    <option value="Martinique" <?php if($country=='Martinique'){echo 'selected="selected"';}?>>Martinique</option>

                    <option value="Mauritania" <?php if($country=='Mauritania'){echo 'selected="selected"';}?>>Mauritania</option>

                    <option value="Mauritius" <?php if($country=='Mauritius'){echo 'selected="selected"';}?>>Mauritius</option>

                    <option value="Mayotte" <?php if($country=='Mayotte'){echo 'selected="selected"';}?>>Mayotte</option>

                    <option value="Mexico" <?php if($country=='Mexico'){echo 'selected="selected"';}?>>Mexico</option>

                    <option value="Micronesia, Federated States" <?php if($country=='Micronesia, Federated States'){echo 'selected="selected"';}?>>

					Micronesia, Federated States</option>

                    <option value="Moldova, Republic Of" <?php if($country=='Moldova, Republic Of'){echo 'selected="selected"';}?>>Moldova, Republic Of</option>

                    <option value="Monaco" <?php if($country=='Monaco'){echo 'selected="selected"';}?>>Monaco</option>

                    <option value="Mongolia" <?php if($country=='Mongolia'){echo 'selected="selected"';}?>>Mongolia</option>                    

					<option value="Montenegro" <?php if($country=='Montenegro'){echo 'selected="selected"';}?>>Montenegro</option>

					<option value="Montserrat" <?php if($country=='Montserrat'){echo 'selected="selected"';}?>>Montserrat</option>

                    <option value="Morocco" <?php if($country=='Morocco'){echo 'selected="selected"';}?>>Morocco</option>

                    <option value="Mozambique" <?php if($country=='Mozambique'){echo 'selected="selected"';}?>>Mozambique</option>

                    <option value="Myanmar" <?php if($country=='Myanmar'){echo 'selected="selected"';}?>>Myanmar</option>

                    <option value="Namibia" <?php if($country=='Namibia'){echo 'selected="selected"';}?>>Namibia</option>

                    <option value="Nauru" <?php if($country=='Nauru'){echo 'selected="selected"';}?>>Nauru</option>

                    <option value="Nepal" <?php if($country=='Nepal'){echo 'selected="selected"';}?>>Nepal</option>

                    <option value="Netherlands" <?php if($country=='Netherlands'){echo 'selected="selected"';}?>>Netherlands</option>

                    <option value="Netherlands Antilles" <?php if($country=='Netherlands Antilles'){echo 'selected="selected"';}?>>Netherlands Antilles</option>

                    <option value="New Caledonia" <?php if($country=='New Caledonia'){echo 'selected="selected"';}?>>New Caledonia</option>

                    <option value="New Zealand" <?php if($country=='New Zealand'){echo 'selected="selected"';}?>>New Zealand</option>

                    <option value="Nicaragua" <?php if($country=='Nicaragua'){echo 'selected="selected"';}?>>Nicaragua</option>

                    <option value="Niger" <?php if($country=='Niger'){echo 'selected="selected"';}?>>Niger</option>

                    <option value="Nigeria" <?php if($country=='Nigeria'){echo 'selected="selected"';}?>>Nigeria</option>

                    <option value="Niue" <?php if($country=='Niue'){echo 'selected="selected"';}?>>Niue</option>

                    <option value="Norfolk Island" <?php if($country=='Norfolk Island'){echo 'selected="selected"';}?>>Norfolk Island</option>

                    <option value="Northern Mariana Islands" <?php if($country=='Northern Mariana Islands'){echo 'selected="selected"';}?>>Northern Mariana Islands					</option>

                    <option value="Norway" <?php if($country=='Norway'){echo 'selected="selected"';}?>>Norway</option>

                    <option value="Oman" <?php if($country=='Oman'){echo 'selected="selected"';}?>>Oman</option>

                    <option value="Pakistan" <?php if($country=='Pakistan'){echo 'selected="selected"';}?>>Pakistan</option>

                    <option value="Palau" <?php if($country=='Palau'){echo 'selected="selected"';}?>>Palau</option>                    

					<option value="Palestine" <?php if($country=='Palestine'){echo 'selected="selected"';}?>>Palestine</option>

					<option value="Panama" <?php if($country=='Panama'){echo 'selected="selected"';}?>>Panama</option>

                    <option value="Papua New Guinea" <?php if($country=='Papua New Guinea'){echo 'selected="selected"';}?>>Papua New Guinea</option>

                    <option value="Paraguay" <?php if($country=='Paraguay'){echo 'selected="selected"';}?>>Paraguay</option>

                    <option value="Peru" <?php if($country=='Peru'){echo 'selected="selected"';}?>>Peru</option>

                    <option value="Philippines" <?php if($country=='Philippines'){echo 'selected="selected"';}?>>Philippines</option>

                    <option value="Pitcairn" <?php if($country=='Pitcairn'){echo 'selected="selected"';}?>>Pitcairn</option>

                    <option value="Poland" <?php if($country=='Poland'){echo 'selected="selected"';}?>>Poland</option>

                    <option value="Portugal" <?php if($country=='Portugal'){echo 'selected="selected"';}?>>Portugal</option>

                    <option value="Puerto Rico" <?php if($country=='Puerto Rico'){echo 'selected="selected"';}?>>Puerto Rico</option>

                    <option value="Qatar" <?php if($country=='Qatar'){echo 'selected="selected"';}?>>Qatar</option>

                    <option value="Reunion" <?php if($country=='Reunion'){echo 'selected="selected"';}?>>Reunion</option>

                    <option value="Romania" <?php if($country=='Romania'){echo 'selected="selected"';}?>>Romania</option>

                    <option value="Russian Federation" <?php if($country=='Russian Federation'){echo 'selected="selected"';}?>>Russian Federation</option>

                    <option value="Rwanda" <?php if($country=='Rwanda'){echo 'selected="selected"';}?>>Rwanda</option>

                    <option value="Saint Kitts And Nevis" <?php if($country=='Saint Kitts And Nevis'){echo 'selected="selected"';}?>>Saint Kitts And Nevis</option>

                    <option value="Saint Lucia" <?php if($country=='Saint Lucia'){echo 'selected="selected"';}?>>Saint Lucia</option>

                    <option value="Saint Vincent and the Grenadines" <?php if($country=='Saint Vincent and the Grenadines'){echo 'selected="selected"';}?>>

					Saint Vincent and the Grenadines</option>

                    <option value="Samoa" <?php if($country=='Samoa'){echo 'selected="selected"';}?>>Samoa</option>

                    <option value="San Marino" <?php if($country=='San Marino'){echo 'selected="selected"';}?>>San Marino</option>

                    <option value="Sao Tome And Principe" <?php if($country=='Sao Tome And Principe'){echo 'selected="selected"';}?>>Sao Tome And Principe</option>

                    <option value="Saudi Arabia" <?php if($country=='Saudi Arabia'){echo 'selected="selected"';}?>>Saudi Arabia</option>                    

					<option value="Serbia" <?php if($country=='Serbia'){echo 'selected="selected"';}?>>Serbia</option>

					<option value="Senegal" <?php if($country=='Senegal'){echo 'selected="selected"';}?>>Senegal</option>

                    <option value="Seychelles" <?php if($country=='Seychelles'){echo 'selected="selected"';}?>>Seychelles</option>

                    <option value="Sierra Leone" <?php if($country=='Sierra Leone'){echo 'selected="selected"';}?>>Sierra Leone</option>

                    <option value="Singapore" <?php if($country=='Singapore'){echo 'selected="selected"';}?>>Singapore</option>

                    <option value="Slovakia (Slovak Republic)" <?php if($country=='Slovakia (Slovak Republic)'){echo 'selected="selected"';}?>>

					Slovakia (Slovak Republic)</option>

                    <option value="Slovenia" <?php if($country=='Slovenia'){echo 'selected="selected"';}?>>Slovenia</option>

                    <option value="Solomon Islands" <?php if($country=='Solomon Islands'){echo 'selected="selected"';}?>>Solomon Islands</option>

                    <option value="Somalia" <?php if($country=='Somalia'){echo 'selected="selected"';}?>>Somalia</option>

                    <option value="South Africa" <?php if($country=='South Africa'){echo 'selected="selected"';}?>>South Africa</option>

                    <option value="South Georgia and South Sandwich Islands" <?php if($country=='South Georgia and South Sandwich Islands.'){echo 'selected="selected"';}?>>

					South Georgia and South Sandwich Islands.</option>

                    <option value="Spain" <?php if($country=='Spain'){echo 'selected="selected"';}?>>Spain</option>

                    <option value="Sri Lanka" <?php if($country=='Sri Lanka'){echo 'selected="selected"';}?>>Sri Lanka</option>

                    <option value="Saint Helena" <?php if($country=='Saint Helena'){echo 'selected="selected"';}?>>Saint Helena</option>

                    <option value="Saint Pierre And Miquelon" <?php if($country=='Saint Pierre And Miquelon'){echo 'selected="selected"';}?>>

					Saint Pierre And Miquelon</option>

                    <option value="Sudan" <?php if($country=='Sudan'){echo 'selected="selected"';}?>>Sudan</option>

                    <option value="Suriname" <?php if($country=='Suriname'){echo 'selected="selected"';}?>>Suriname</option>

                    <option value="Svalbard, Jan Mayen Islands" <?php if($country=='Svalbard, Jan Mayen Islands'){echo 'selected="selected"';}?>>

					Svalbard, Jan Mayen Islands</option>

                    <option value="Swaziland" <?php if($country=='Swaziland'){echo 'selected="selected"';}?>>Swaziland</option>

                    <option value="Sweden" <?php if($country=='Sweden'){echo 'selected="selected"';}?>>Sweden</option>

                    <option value="Switzerland" <?php if($country=='Switzerland'){echo 'selected="selected"';}?>>Switzerland</option>

                    <option value="Syrian Arab Republic" <?php if($country=='Syrian Arab Republic'){echo 'selected="selected"';}?>>Syrian Arab Republic</option>

                    <option value="Taiwan" <?php if($country=='Taiwan'){echo 'selected="selected"';}?>>Taiwan</option>

                    <option value="Tajikistan" <?php if($country=='Tajikistan'){echo 'selected="selected"';}?>>Tajikistan</option>

                    <option value="Tanzania, United Republic Of" <?php if($country=='Tanzania, United Republic Of'){echo 'selected="selected"';}?>>

					Tanzania, United Republic Of</option>

                    <option value="Thailand" <?php if($country=='Thailand'){echo 'selected="selected"';}?>>Thailand</option>

                    <option value="Togo" <?php if($country=='Togo'){echo 'selected="selected"';}?>>Togo</option>

                    <option value="Tokelau" <?php if($country=='Tokelau'){echo 'selected="selected"';}?>>Tokelau</option>

                    <option value="Tonga" <?php if($country=='Tonga'){echo 'selected="selected"';}?>>Tonga</option>

                    <option value="Trinidad And Tobago" <?php if($country=='Trinidad And Tobago'){echo 'selected="selected"';}?>>Trinidad And Tobago</option>

                    <option value="Tunisia" <?php if($country=='Tunisia'){echo 'selected="selected"';}?>>Tunisia</option>

                    <option value="Turkey" <?php if($country=='Turkey'){echo 'selected="selected"';}?>>Turkey</option>

                    <option value="Turkmenistan" <?php if($country=='Turkmenistan'){echo 'selected="selected"';}?>>Turkmenistan</option>

                    <option value="Turks And Caicos Islands" <?php if($country=='Turks And Caicos Islands'){echo 'selected="selected"';}?>>Turks And Caicos Islands					</option>

                    <option value="Tuvalu" <?php if($country=='Tuvalu'){echo 'selected="selected"';}?>>Tuvalu</option>

                    <option value="Uganda" <?php if($country=='Uganda'){echo 'selected="selected"';}?>>Uganda</option>

                    <option value="Ukraine" <?php if($country=='Ukraine'){echo 'selected="selected"';}?>>Ukraine</option>

                    <option value="United Arab Emirates" <?php if($country=='United Arab Emirates'){echo 'selected="selected"';}?>>United Arab Emirates</option>

                    <option value="United Kingdom" <?php if($country=='United Kingdom'){echo 'selected="selected"';}?>>United Kingdom</option>

                    <option value="United States of America" <?php if($country=='United States of America'){echo 'selected="selected"';}?> selected="selected">United States of America					</option>

                    <option value="Uruguay" <?php if($country=='Uruguay'){echo 'selected="selected"';}?>>Uruguay</option>

                    <option value="Uzbekistan" <?php if($country=='Uzbekistan'){echo 'selected="selected"';}?>>Uzbekistan</option>

                    <option value="Vanuatu" <?php if($country=='Vanuatu'){echo 'selected="selected"';}?>>Vanuatu</option>

                    <option value="Venezuela" <?php if($country=='Venezuela'){echo 'selected="selected"';}?>>Venezuela</option>

                    <option value="Vietnam" <?php if($country=='Vietnam'){echo 'selected="selected"';}?>>Vietnam</option>

                    <option value="Virgin Islands (British)" <?php if($country=='Virgin Islands (British)'){echo 'selected="selected"';}?>>Virgin Islands (British)					</option>

                    <option value="Virgin Islands (U.S.)" <?php if($country=='Virgin Islands (U.S.)'){echo 'selected="selected"';}?>>Virgin Islands (U.S.)</option>

                    <option value="Wallis And Futuna Islands" <?php if($country=='Wallis And Futuna Islands'){echo 'selected="selected"';}?>>Wallis And Futuna Islands				</option>

                    <option value="Western Sahara" <?php if($country=='Western Sahara'){echo 'selected="selected"';}?>>Western Sahara</option>

                    <option value="Yemen" <?php if($country=='Yemen'){echo 'selected="selected"';}?>>Yemen</option>

                    <option value="Zaire" <?php if($country=='Zaire'){echo 'selected="selected"';}?>>Zaire</option>

                    <option value="Zambia" <?php if($country=='Zambia'){echo 'selected="selected"';}?>>Zambia</option>

                    <option value="Zimbabwe" <?php if($country=='Zimbabwe'){echo 'selected="selected"';}?>>Zimbabwe</option>

					<option value="Other" <?php if($country=='Other'){echo 'selected="selected"';}?>>Other</option>
 

        </select></span>

		

        <span><label><b>*</b>Email Address:</label><input type="text" value="" class="input" name="email" /></span>

        <span><label><b>*</b>Phone Number:</label><input type="text" value="" class="input" name="phone_no" /></span>

		
 

      <span><label><b>*</b>Date of Birth:</label>

	  <select class="input02" name="year" style="width:65px;">

            <option value="0">YYYY</option>

            <?   

			  $Year= date("Y");

			for($Y=($Year-69); $Y<=$Year; $Y++){ ?>

			<option value="<?=$Y ?>"><?=$Y ?></option>

            <? } ?>

          </select> 

		  <select class="input02" name="day" style="width:50px;">

            <option value="0">DD</option>

            <? for($D=1;$D<=31;$D++) { ?>

			<option value="<?=$D ?>"><?=$D ?></option>            

			<? } ?>

          </select>

		  <select class="input02" name="month" style="width:50px;">

            <option value="0">MM</option>

            <option value="01">Jan</option>

            <option value="02">Feb</option>

            <option value="03">Mar</option>

            <option value="04">Apr</option>

			<option value="05">May</option>

			<option value="06">Jun</option>

			<option value="07">Jul</option>

			<option value="08">Aug</option>

			<option value="09">Sep</option>

			<option value="10">Oct</option>

			<option value="11">Nov</option>

			<option value="12">Dec</option>

          </select>

		     

		</span>

     

        <h5 class="sub_heading01" style="margin-top:20px;">Experience:</h5>    

        <h5 class="sub_heading02">Film</h5>

        <span><label>Project</label><input type="text" value="" class="input" name="project1" id="project1"/></span>

        <span><label>Role</label><input type="text" value="" class="input" name="role1" id="role1" /></span>

        <span><label>Producer/Director</label><input type="text" value="" class="input" name="director1" id="director1" /></span>

	    <div id="my_div"></div>

		<input type="hidden" name="apnd" value="1" /> 

       <a href="javascript:void(0)" onclick="AddFilm();">add another film</a>

		

    </div>

    <div class="data01" style="margin-left:15px;">

    	<span><label><b>*</b>Gender:</label><input type="radio" class="radio"   name="gender" value="Female"/><label>Female</label><input type="radio" class="radio" name="gender" value="Male" /><label>Male</label></span>

		<span><label>Ethnicity</label><select class="input"  name="ethnicity">

        											<option value="0">Select Ethnicity</option>

                                                    <option value="Caucasian">Caucasian</option>

                                                    <option value="Native American">Native American</option>

                                                    <option value="Multi-Ethnic">Multi-Ethnic</option>

                                                    <option value="Asian">Asian</option>

                                                    <option value="African American">African American</option>

                                                    <option value="Hispanic">Hispanic</option>

                                                    <option value="East Indian">East Indian</option>

                                                    <option value="Middle Eastern">Middle Eastern</option>

                                                    <option value="Pacific Islander">Pacific Islander</option>

                                                    <option value="Other">Other</option>

                                                    

        									</select>

											

		  </span>

        <span><label><b>*</b>Height:</label><select class="input02"  name="hight2">

        											<option value="0">Select -</option>

                                                    <option value="1">1 inch</option>

                                                    <option value="2">2 inches</option>

                                                    <option value="3">3 inches</option>

                                                    <option value="4">4 inches</option>

                                                    <option value="5">5 inches</option>

                                                    <option value="6">6 inches</option>

                                                    <option value="7">7 inches</option>

                                                    <option value="8">8 inches</option>

                                                    <option value="9">9 inches</option>

                                                    <option value="10">10 inches</option>

                                                    <option value="11">11 inches</option>

        									</select>

											<select class="input02" name="hight1">

        											<option value="0">Select -</option>

                                                    <option value="4'">4 feet</option>

                                                    <option value="5'">5 feet</option>

                                                    <option value="6'">6 feet</option>

                                                    <option value="7'">7 feet</option>

        									</select>

		  </span>

        <span><label><b>*</b>Weight:</label><select class="input" name="weight">

        											<option value="0">Select -</option>

                                                    <option value="70-75" <? if($RowRec['weight']=="70-75"){echo 'selected="selected"';} ?>>70-75</option>

                                                    <option value="76-80" <? if($RowRec['weight']=="76-80"){echo 'selected="selected"';} ?>>76-80</option>

													<option value="81-85" <? if($RowRec['weight']=="81-85"){echo 'selected="selected"';} ?>>81-85</option>

                                                    <option value="86-90" <? if($RowRec['weight']=="86-90"){echo 'selected="selected"';} ?>>86-90</option>

													<option value="91-95" <? if($RowRec['weight']=="91-95"){echo 'selected="selected"';} ?>>91-95</option>

													<option value="96-100" <? if($RowRec['weight']=="96-100"){echo 'selected="selected"';} ?>>96-100</option>

                                                    <option value="101-105" <? if($RowRec['weight']=="101-105"){echo 'selected="selected"';} ?>>101-105</option>

													<option value="106-110" <? if($RowRec['weight']=="106-110"){echo 'selected="selected"';} ?>>106-110</option>

                                                    <option value="111-115" <? if($RowRec['weight']=="111-115"){echo 'selected="selected"';} ?>>111-115</option>

													<option value="116-120" <? if($RowRec['weight']=="116-120"){echo 'selected="selected"';} ?>>116-120</option>

                                                    <option value="121-125" <? if($RowRec['weight']=="121-125"){echo 'selected="selected"';} ?>>121-125</option>

                                                    <option value="126-130" <? if($RowRec['weight']=="126-130"){echo 'selected="selected"';} ?>>126-130</option>

                                                    <option value="131-135" <? if($RowRec['weight']=="131-135"){echo 'selected="selected"';} ?>>131-135</option>

                                                    <option value="136-140" <? if($RowRec['weight']=="136-140"){echo 'selected="selected"';} ?>>136-140</option>

                                                    <option value="141-145" <? if($RowRec['weight']=="141-145"){echo 'selected="selected"';} ?>>141-145</option>

													<option value="146-150" <? if($RowRec['weight']=="146-150"){echo 'selected="selected"';} ?>>146-150</option>

													<option value="151-155" <? if($RowRec['weight']=="151-155"){echo 'selected="selected"';} ?>>151-155</option>

													<option value="156-160" <? if($RowRec['weight']=="156-160"){echo 'selected="selected"';} ?>>156-160</option>

													<option value="161-165" <? if($RowRec['weight']=="161-165"){echo 'selected="selected"';} ?>>161-165</option>

													<option value="166-170" <? if($RowRec['weight']=="166-170"){echo 'selected="selected"';} ?>>166-170</option>

													<option value="170-175" <? if($RowRec['weight']=="170-175"){echo 'selected="selected"';} ?>>170-175</option>

													<option value="176-180" <? if($RowRec['weight']=="176-180"){echo 'selected="selected"';} ?>>176-180</option>

													<option value="181-185" <? if($RowRec['weight']=="181-185"){echo 'selected="selected"';} ?>>181-185</option>

													<option value="186-190" <? if($RowRec['weight']=="186-190"){echo 'selected="selected"';} ?>>186-190</option>

													<option value="191-195" <? if($RowRec['weight']=="191-195"){echo 'selected="selected"';} ?>>191-195</option>

													<option value="196-200" <? if($RowRec['weight']=="196-200"){echo 'selected="selected"';} ?>>196-200</option>

													<option value="201-205" <? if($RowRec['weight']=="201-205"){echo 'selected="selected"';} ?>>201-205</option>

													<option value="206-210" <? if($RowRec['weight']=="206-210"){echo 'selected="selected"';} ?>>206-210</option>

													<option value="211-215" <? if($RowRec['weight']=="211-215"){echo 'selected="selected"';} ?>>211-215</option>

													<option value="216-220" <? if($RowRec['weight']=="216-220"){echo 'selected="selected"';} ?>>216-220</option>

													<option value="221-225" <? if($RowRec['weight']=="221-225"){echo 'selected="selected"';} ?>>221-225</option>

													<option value="226-230" <? if($RowRec['weight']=="226-230"){echo 'selected="selected"';} ?>>226-230</option>

													<option value="231-235" <? if($RowRec['weight']=="231-235"){echo 'selected="selected"';} ?>>231-235</option>

													<option value="236-240" <? if($RowRec['weight']=="236-240"){echo 'selected="selected"';} ?>>236-240</option>

													<option value="241-245" <? if($RowRec['weight']=="241-245"){echo 'selected="selected"';} ?>>241-245</option>

													<option value="246-250" <? if($RowRec['weight']=="246-250"){echo 'selected="selected"';} ?>>246-250</option>

													<option value="251-255" <? if($RowRec['weight']=="251-255"){echo 'selected="selected"';} ?>>251-255</option>

													<option value="256-260" <? if($RowRec['weight']=="256-260"){echo 'selected="selected"';} ?>>256-260</option>

													<option value="261-265" <? if($RowRec['weight']=="261-265"){echo 'selected="selected"';} ?>>261-265</option>

													<option value="266-270" <? if($RowRec['weight']=="266-270"){echo 'selected="selected"';} ?>>266-270</option>

													<option value="271-275" <? if($RowRec['weight']=="271-275"){echo 'selected="selected"';} ?>>271-275</option>

													<option value="276-280" <? if($RowRec['weight']=="276-280"){echo 'selected="selected"';} ?>>276-280</option>

													<option value="281-285" <? if($RowRec['weight']=="281-285"){echo 'selected="selected"';} ?>>281-285</option>

													<option value="286-290" <? if($RowRec['weight']=="286-290"){echo 'selected="selected"';} ?>>286-290</option>

													<option value="291-295" <? if($RowRec['weight']=="291-295"){echo 'selected="selected"';} ?>>291-295</option>

													<option value="296-300" <? if($RowRec['weight']=="296-300"){echo 'selected="selected"';} ?>>296-300</option>

        </select></span>

        <span><label><b>*</b>Eye color:</label><select class="input"  name="eyecolor">

        											<option value="None Selected">Select Eye Color</option>

                                                    <option value="Blue">Blue</option>

                                                    <option value="Brown">Brown</option>

                                                    <option value="Green">Gray</option>

                                                    <option value="Grey">Green</option>

													<option value="Hazel">Hazel</option>

	     									</select>

		

        </select></span>

        <span><label><b>*</b>Hair color:</label><select class="input"  name="haircolor">

        											<option value="None Selected">Select Hair Color</option>

                                                    <option value="Black">Black</option>

                                                    <option value="Blond">Blond</option>

                                                    <option value="Dark Brown">Dark Brown</option>

													<option value="Gray">Gray</option>

													<option value="Light Brown">Light Brown</option>

													<option value="Red">Red</option>

													<option value="White">White</option>

        									</select>

	

        </select></span>

        <span><label><strong>*File size limited to 1MB per image</strong></label></span>

        <span><label><b>*</b>Headshot Photo:</label><input type="file" class="upload" value="" name="headshot" /></span>

        <span><label><b>*</b>Waist up Photo:</label><input type="file" class="upload" value="" name="waistup" /></span>

        <span><label><b>*</b>Full body Photo:</label><input type="file" class="upload" value="" name="fullbody" /></span>

		

        <span style="margin-top:20px;"><label><strong>Additional Images:</strong></label></span>

        <span><label>Gallery Photo:</label><input type="file" class="upload" value="" name="OtherPhoto1" id="OtherPhoto1"/></span>

		<div id="photo_div"></div>

		<input type="hidden" name="apndPhoto" value="1" />

		<!--<a href="javascript:void(0)" onclick='javascript:createNew("upload","file",1);'>

		<input type='hidden' id='uploadcount' name='uploadcount' value='0' />  -->

        <a href="javascript:void(0)" onclick="AddPhoto();">add another photo</a>

         <span style="margin-top:20px;">

        <label><strong>Media:</strong></label>

         </span>

             1-3 minute REEL or CLIP from recent work

             Please paste the Embed line for your 

			 <strong>320px X 265px</strong> Youtube video source here:

             <p>   

           <textarea class="youtube_area" name="media"></textarea>

           

          </p>

         <span style="margin-top:20px; width:100%"><label><strong>Affiliations:</strong></label></span>

        <span style="width:50%;">

        <input name="Affiliations[]" type="checkbox" value="SAG" class="check_affil" /><h2>SAG</h2></span>

        <span style="width:50%;"><input name="Affiliations[]" type="checkbox" value="AFTRA" class="check_affil" /><h2>AFTRA</h2></span>

		<span style="width:50%;"><input name="Affiliations[]" type="checkbox" value="SAG Eligible" class="check_affil" /><h2>SAG Eligible</h2></span>

        <span style="width:50%;"><input name="Affiliations[]" type="checkbox" value="AFTRA Must Join"class="check_affil" /><h2>AFTRA Must Join</h2></span><br />

		

		<span style="width:50%;"><input name="Affiliations[]" type="checkbox" value="SAG Core" class="check_affil" /><h2>SAG Core</h2></span><br />

        

        

        <span style="width:50%;"><input name="Affiliations[]" type="checkbox" value="Non-Union" class="check_affil" /><h2>Non-Union</h2></span>

        	 

        <!--<span style="margin-top:20px;"><label><strong>Affiliations:</strong></label></span>

        <span><input name="Affiliations[]" type="checkbox" value="SAG" class="check_affil" /><h2>SAG</h2></span>

        <span><input name="Affiliations[]" type="checkbox" value="SAG Eligible" class="check_affil" /><h2>SAG Eligible</h2></span>

        <span><input name="Affiliations[]" type="checkbox" value="SAG Core" class="check_affil" /><h2>SAG Core</h2></span><br />

        <span><input name="Affiliations[]" type="checkbox" value="AFTRA" class="check_affil" /><h2>AFTRA</h2></span>

        <span><input name="Affiliations[]" type="checkbox" value="AFTRA Must Join" class="check_affil" /><h2>AFTRA Must Join</h2></span><br />

        <span><input name="Affiliations[]" type="checkbox" value="AEA" class="check_affil" /><h2>AEA</h2></span>

        <span><input name="Affiliations[]" type="checkbox" value="AGVA" class="check_affil" /><h2>AGVA</h2></span>

        <span><input name="Affiliations[]" type="checkbox" value="ACTRA" class="check_affil" /><h2>ACTRA</h2></span>-->

    </div>

    

    <span class="sep_line" style="margin-top:20px;"></span>

    

    <div class="data01">    

        <h5 class="sub_heading02">TV</h5>

        <span><label>Project</label><input type="text" value="" class="input" name="projtv1" id="projtv1" /></span>

        <span><label>Role</label><input type="text" value="" class="input" name="roletv1" id="roletv1" /></span>

        <span><label>Producer/Director</label><input type="text" value="" class="input" name="directv1" id="directv1" /></span>

		<div id="tv_div"></div>

		<input type="hidden" name="apndtv" value="1" />

        <a href="javascript:void(0)" onclick="AddTv();">add another TV project</a> 

    </div>

    

    <span class="sep_line" style="margin-top:20px;"></span>

    

     <div class="data01">    

        <h5 class="sub_heading02">Commercial</h5>

        <span><label>Project</label><input type="text" value="" class="input" name="projcom1" id="projcom1" /></span>

        <span><label>Role</label><input type="text" value="" class="input" name="rolecom1" id="rolecom1" /></span>

        <span><label>Producer/Director</label><input type="text" value="" class="input" name="direcom1"  id="direcom1"/></span>

		<div id="com_div"></div>

		<input type="hidden" name="apndCom" value="1" />

        <a href="javascript:void(0)" onclick="AddComm();">add another Commercial</a>

    </div>  

    

    <span class="sep_line" style="margin-top:20px;"></span>

    

    <div class="data01">    

        <h5 class="sub_heading02">Theatre</h5>

        <span><label>Project</label><input type="text" value="" class="input" name="projthr1" id="projthr1"/></span>

        <span><label>Role</label><input type="text" value="" class="input" name="rolethr1" id="rolethr1"/></span>

        <span><label>Producer/Director</label><input type="text" value="" class="input" name="direthr1" id="direthr1" /></span>

		<div id="thr_div"></div>

		<input type="hidden" name="apndThr" value="1" />

        <a href="javascript:void(0)" onclick="AddTeatre();">add another Theatre role</a>         

    </div>

    

    <span class="sep_line" style="margin-top:20px;"></span> 

    

    <div class="data02">

      <label>Training:</label>

      <textarea class="notes" name="note"></textarea>  

    	</div>

        <div class="data02">

      <label>Skills &amp; abilities:</label>

      <textarea class="notes" name="ability"></textarea>

    	</div>

		<input type="submit" class="submit" value="" name="Submit" onclick="javascript:return ChkForm()" />

		 <input type="hidden" name="act" />

</div>  <!--onclick="javascript:return ChkForm()"-->

</form>

        </div>

</div>

</body>

</html>

Open in new window

0
 
LVL 2

Author Comment

by:Robo2000
ID: 24827852
I am trying to fix some bugs in an existing site.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 24828067
Maybe after line 1160 and before the "input type=file" statement.  Something like this:

      <input type="hidden" name="MAX_FILE_SIZE" value="1024000" />

Since you have three file input fields, you may want to test with three 512K images to see if that works.  I do not know if the max_file_size applies to each uploaded file or to the sum of the uploaded files.

Also, since almost every camera phone (not to mention quality digital camera) is capable of making a multi-megabyte image, you might want to consider uploading the full-size image and then resizing the image to suit your needs - smaller if that is what you want.  That way, instead of just rejecting the client's data, you could be accommodating - accept their input and still keep your storage and bandwidth loads down to acceptable levels.

best regards, ~Ray
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Author Comment

by:Robo2000
ID: 24828098
I need to re-write this section, I am just trying to get an easy way of restricting the file sizes due to PHP timeouts for everything the script is trying to do.   It is a nightmare.
0
 
LVL 2

Author Comment

by:Robo2000
ID: 24828106
Unfortunately, that line of code has not had an impact it is still processing everything over that file size, individually or together!  The way this script deals with images is not good!
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 24828167
When you say, "timeouts" - what is the error message you get?
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 24828173
BTW, I completely agree with this statement:

"I need to re-write this section"

You have my 100% support for that notion, as well as my sympathy!
0
 
LVL 1

Expert Comment

by:seberptyltd
ID: 24828256
The trouble with using the form to upload the file is that you can't check it's file size untill after it has been submitted to the server. This can cause problems with time-outs due to massively large files.

You can use a flash based uploader to check the file size and file extension before upload begins. There are many solutions but most require payment.
A great free and easy to configure solution is the Seber Flash File Uploader available from http://www.seber.com.au/downloads/SeberFlashUpload.aspx
With this uploader you can set the maximum file size and what image formats you want to upload.  There is a php or asp.net example included in the download as well as documentation.
0
 
LVL 2

Author Closing Comment

by:Robo2000
ID: 31602288
This was a very comprehensive solution and worked well
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to dynamically set the form action using jQuery.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now