PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Zeceer
Forum Contributor
Posts: 136 Joined: Fri Aug 02, 2002 5:10 am
Location: Norway
Post
by Zeceer » Thu Jul 24, 2003 9:28 am
Hi,
got his form
Code: Select all
<form method="post" action="images_add_script.php" enctype="multipart/form-data">
<input type="file" name="image" size="25">
<input type="submit" value="Legg til!">
</form>
and this is the script
Code: Select all
@copy("$image" , "../images/uploaded/")
or die("Could not upload.");
It want upload whatever I do. For some reason
DuFF
Forum Contributor
Posts: 495 Joined: Tue Jun 24, 2003 7:49 pm
Location: USA
Post
by DuFF » Thu Jul 24, 2003 9:36 am
Try looking here for some more help with file uploads:
http://www.php.net/manual/en/features.file-upload.php
You will need to do something like this
Code: Select all
<?php
$uploaddir = path/to/upload/folder;
copy($_FILES["image"]["tmp_name"], $uploaddir .$_FILES["filename"]["name"])
?>