2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ale89
0
<?php
if(file_exists('../portfolio/'.$_GET['portfolio'])){
	if(!empty($_FILES["gallery_image"]['name'])){
    	     $gallery = "gallery_".rand().".jpg";
    	     move_uploaded_file($_FILES["gallery_image"]["tmp_name"], "../portafolio/".$_GET['portafolio']."/" . $gallery);
    	     $msg.= '<b style="color:green;">Imagen subido.</b>';
	}else{
             $msg.= '<b style="color:green;">No subio la imagen.</b>';   
        }
?>	
<form action="" method="post" enctype="multipart/form-data">
	<?php echo $msg;?>
	<div class="info">
		<p><label>Imagen </label><input type="file" name="gallery_image"/></p>
                <p><input type="submit" value="Subir portafolio" class="submit" name="upload"/></p>
        </div>';
</form>
<?php
}else{
     $body .= 'Directory does not exist';
}

OK, sorry had to reformat to my understanding.
So, the form only appears if the a folder exists. Is that right?

You seem to have mixed up your destination folders: portfolio and portafolio

0

Sorry, I'm wrong rather than portafolio is portfolio, but still works wrong

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.