Agh, parse errors!

I know I’m probably missing something obvious, but I just can’t find the error in my PHP document!

Message: Parse error: syntax error, unexpected ‘=’ in /home/.fang/laytin/laytin.nightstand.org/myupload/uploader.php on line **63

Code:


<?php

//OPEN READABLE OLD DATA FILE, CUT CLOSING TAG
$readDataXML = substr(file_get_contents('data.xml'),-10) or die ("no data file!");

//CREATE/OPEN WRITABLE TEMP FILE
$writeTempXML = fopen('temp.xml', 'w') or die ("no temp writing!");


//UPLOAD IMAGES

$image_path = "images/";
$thumbs_path = "images/";
$image_path = $image_path . basename( $_FILES['bigimage']['name']);
$thumbs_path = $thumbs_path . basename( $_FILES['thumbnail']['name']);
$_FILES['bigimage']['tmp_name'];
$_FILES['thumbnail']['tmp_name'];

if(move_uploaded_file($_FILES['bigimage']['tmp_name'], $image_path)) 
    {
            echo "The file ". ( $_FILES['bigimage']['name']). " has been uploaded. <br />";
    } 
    else    {
            echo "There was an error uploading the image, please try again!<br />";
    }

if(move_uploaded_file($_FILES['thumbnail']['tmp_name'], $thumbs_path))
    {
            echo "The file ". ( $_FILES['thumbnail']['name']). " has been uploaded. <br />";
    }
    else    {
            echo "There was an error uploading the thumbnail, please try again!<br />";
    }

$title = $_POST['title'];
$description = $_POST['description'];
echo "<b>". $title ."</b> loaded successfully. <br />";
echo "<b>Description: </b>". $description ."<br />";



//OUTPUT XML

$output = "<picture>

        	<image>". $image_path ."</image>

        	<thumb>". $thumbs_path ."</thumb>

        	<title>". $title . "</image>

        	<description>". $description . "</description>

        </picture>
";

//WRITE CHOPPED OLD DATA TO TEMP FILE
fwrite($writeTempXML, $readDataXML);
fwrite($writeTempXML, $output);
fwrite($writeTempXML, "</gallery>");

//CLOSE WRITABLE TEMP FILE
fclose($writeTempXML);

//CLOSE WRITABLE TEMP FILE
fclose($readDataXML);

//OPEN READABLE TEMP FILE
readTempXML = fopen('temp.xml', 'r') or die ("no temp reading!");

//OPEN WRITABLE DATA FILE
writeDataXML = fopen('data.xml', 'w') or die ("no data writing!");

//WRITE TEMP DATA TO DATA FILE
fwrite($writeDataXML, $readTempXML);

//CLOSE WRITABLE DATA FILE
fclose($writeDataXML);

?>

**

look at those two lines:

//OPEN READABLE TEMP FILE
readTempXML = fopen('temp.xml', 'r') or die ("no temp reading!");
 
//OPEN WRITABLE DATA FILE
writeDataXML = fopen('data.xml', 'w') or die ("no data writing!");
 

put a $ in front :wink:

//OPEN READABLE TEMP FILE
$readTempXML = fopen('temp.xml', 'r') or die ("no temp reading!");
 
//OPEN WRITABLE DATA FILE
$writeDataXML = fopen('data.xml', 'w') or die ("no data writing!");
 

heh wow… i must be losing my mind! :te: thanks for pointing that out!

i know the feeling :wink: