php help   
		
		
		Trying to put an upload file php script on my site. Am getting an error with this script: 
	Code: 
	
 <?php 
if(!isset($_POST['Upload'])) 
{ 
        include("form_upload.inc"); 
} # endif 
else 
{ 
        if($_FILES['pix']['tmp_name'] hahahaha "none") 
        { 
                echo "<b>File did not successfully upload. Check the file size. File must be less than 500kB.<br>"; 
                include("form_upload.inc"); 
                exit(); 
        { 
        if(!ereg("image",$_FILES['pix']['type'])) 
        { 
                echo "<b>File is not a picture. Please try another file.</b><br>"; 
                include("form_upload.inc"); 
                exit(); 
        } 
        else 
        { 
                $destination = '/home/asianr/public_html/'."\\".$_FILES['pix']['name']; 
                $temp_file = $_FILES['pix']['tmp_name']; 
                move_uploaded_file($temp_file,$destination); 
                echo "<p><b>The file has successfully uploaded:</b> 
                        {$_FILES['pix']['name']} 
                        ({$_FILES['pix']['size']})</p>"; 
                        } 
                } 
        ?> 
 Parse error: parse error, unexpected $ in /home/asianr/public_html/pa/uploadfile.php on line 30
 
line 30 shows up as  
	Code: 
	
                 $destination = '/home/asianr/public_html/'."\\".$_FILES['pix']['name']; 
  I think it could be a problem with the /home/asianr/public_html/ part as everything else was copied from a book but I am not sure what to put.  
	 |