Forum Moderators: coopster
I'm trying to allow my visitors to upload an image onto the server using PHP.
I've followed some tutorials, but I haven't been able to get it to work.
I was hoping somebody could look at my code and tell me if I have a typo or something.
On the form page:
<form method="post" action="/upload.php" enctype="multipart/form-data">
<input type="file" name="o12" accept="image/jpeg">
</form>
Then on the PHP page:
if($o12['type']=="image/jpeg"){
copy($o12['tmp_name'],"/images/".$o12['name']);
}
Thanks.