Error Using PHP Class <b>Notice</b>: Undefined property
I am still a newby with PHP.  I have a flash file that passes some variables to a php script and creates a zip file of a group of jpg files.  When I had all of the code in one php file everything worked fine.  Now I wanted to separate out the script into two files.  One php file that gets the variables and a class that would actually do the work of creating the file.  However I am getting this error when I run it.

    <br />
    <b>Notice</b>:  Undefined property: ZipTestClass::$FileName.zip in <b>F:\Web Page      mcwphoto43\TestZip\Array\ZipTestClass.php</b> on line <b>15</b><br />
    <br />

**Here is my original code which worked just fine**

    <?PHP
    //stores the URLvariables into variables that php can use
    $img1 = $_GET['Image1']; 
    $img2 = $_GET['Image2']; 
    $img3= $_GET['Image3'];
    $zipName= $_GET['Name'];

    // create object
    $zip = new ZipArchive();

    // open archive 
    if ($zip->open($zipName, ZIPARCHIVE::CREATE) !== TRUE) {
    die ("Could not open archive");
    }

    // list of files to add
    $fileList = array(
    'ZipTest/' . $img1,
    'ZipTest/' . $img2,
	'ZipTest/' . $img3
    );

    // add files
    foreach ($fileList as $f) {
    $zip->addFile($f) or die ("ERROR: Could not add file: $f");  
    }
    
    // close and save archive
    $zip->close();
    echo "Archive created successfully.";   
    ?> 


**Here is the first part of my new code which brings in the variables and calls the class**

    <?PHP

    //stores the URLvariables into variables that php can use
    $Img1 = $_GET['Image1']; 
    $Img2 = $_GET['Image2']; 
    $Img3= $_GET['Image3'];
    $zipName= $_GET['Name'];
    //$RandVariable = $_GET['randString'];

    echo "Variables $Img1, $Img2, $Img3, $zipName were accepted."; 

    //Brings in ZipTestClass, creates an instance of the class as a variable, assgns values to the class
    include "ZipTestClass.php";

    $OrderInfo = new ZipTestClass;

    $OrderInfo->img1 = "$Img1";
    $OrderInfo->img2 = "$Img2";
    $OrderInfo->img3 = "$Img3";
    $OrderInfo->zipName = "$zipName";
    $OrderInfo->CreateZip($Img1,$Img2,$Img3,$zipName);

    ?>

**Here is the class**

    <?PHP
    class ZipTestClass{

    //Receivers of the URLvariables needed to create the sip file based on the customers     order
    var $img1;
    var $img2;
    var $img3;
    var $zipName;
    var $zip;

	public function CreateZip($img1, $img2, $img3, $zipName)
	{
		// create object
		$zip = new ZipArchive();
		$fileArchive = $this->$zipName;

		// open archive 
		if ($zip->open('Work', ZIPARCHIVE::CREATE) !== TRUE) 
		{
    		die ("Could not open archive");
		}

	
		// list of files to add
		$fileList = array('ZipTest/' . $this->$img1, 'ZipTest/' . $this->$img2,     'ZipTest/' . $this->$img3);

		// add files
		foreach ($fileList as $f) 
		{
    		$zip->addFile($f) or die ("ERROR: Could not add file: $f");   
		}
    
		// close and save archive
		$zip->close();
		echo "Archive created successfully."; 
	}
    }
    ?> 


Any help would be greatly appreciated
Error Using PHP Class <b>Notice</b>: Undefined property
===

I am still a newby with PHP.  I have a flash file that passes some variables to a php script and creates a zip file of a group of jpg files.  When I had all of the code in one php file everything worked fine.  Now I wanted to separate out the script into two files.  One php file that gets the variables and a class that would actually do the work of creating the file.  However I am getting this error when I run it.

    <br />
    <b>Notice</b>:  Undefined property: ZipTestClass::$FileName.zip in <b>F:\Web Page      mcwphoto43\TestZip\Array\ZipTestClass.php</b> on line <b>15</b><br />
    <br />

**Here is my original code which worked just fine**

    <?PHP
    //stores the URLvariables into variables that php can use
    $img1 = $_GET['Image1']; 
    $img2 = $_GET['Image2']; 
    $img3= $_GET['Image3'];
    $zipName= $_GET['Name'];

    // create object
    $zip = new ZipArchive();

    // open archive 
    if ($zip->open($zipName, ZIPARCHIVE::CREATE) !== TRUE) {
    die ("Could not open archive");
    }

    // list of files to add
    $fileList = array(
    'ZipTest/' . $img1,
    'ZipTest/' . $img2,
	'ZipTest/' . $img3
    );

    // add files
    foreach ($fileList as $f) {
    $zip->addFile($f) or die ("ERROR: Could not add file: $f");  
    }
    
    // close and save archive
    $zip->close();
    echo "Archive created successfully.";   
    ?> 


**Here is the first part of my new code which brings in the variables and calls the class**

    <?PHP

    //stores the URLvariables into variables that php can use
    $Img1 = $_GET['Image1']; 
    $Img2 = $_GET['Image2']; 
    $Img3= $_GET['Image3'];
    $zipName= $_GET['Name'];
    //$RandVariable = $_GET['randString'];

    echo "Variables $Img1, $Img2, $Img3, $zipName were accepted."; 

    //Brings in ZipTestClass, creates an instance of the class as a variable, assgns values to the class
    include "ZipTestClass.php";

    $OrderInfo = new ZipTestClass;

    $OrderInfo->img1 = "$Img1";
    $OrderInfo->img2 = "$Img2";
    $OrderInfo->img3 = "$Img3";
    $OrderInfo->zipName = "$zipName";
    $OrderInfo->CreateZip($Img1,$Img2,$Img3,$zipName);

    ?>

**Here is the class**

    <?PHP
    class ZipTestClass{

    //Receivers of the URLvariables needed to create the sip file based on the customers     order
    var $img1;
    var $img2;
    var $img3;
    var $zipName;
    var $zip;

	public function CreateZip($img1, $img2, $img3, $zipName)
	{
		// create object
		$zip = new ZipArchive();
		$fileArchive = $this->$zipName;

		// open archive 
		if ($zip->open('Work', ZIPARCHIVE::CREATE) !== TRUE) 
		{
    		die ("Could not open archive");
		}

	
		// list of files to add
		$fileList = array('ZipTest/' . $this->$img1, 'ZipTest/' . $this->$img2,     'ZipTest/' . $this->$img3);

		// add files
		foreach ($fileList as $f) 
		{
    		$zip->addFile($f) or die ("ERROR: Could not add file: $f");   
		}
    
		// close and save archive
		$zip->close();
		echo "Archive created successfully."; 
	}
    }
    ?> 


Any help would be greatly appreciated