I make another way to make my upload picture: ftp and a select generating thumb picture in my admin menu.
thanks for help
blobaya
my upload form:
<form enctype=”multipart/form-data” action=”wp-admin/wp-picture-admin.php” method=”post”>
Album <select name=”album”><?php foreach ($albums as $album) { echo ‘<option value=”‘.$album->album_id.’,,,’.$album->album_path.'”> ‘.htmlentities($album->album_name); }?></select>
Picture <input type=”file” name=”picture” />
<input type=”submit” name=”pictupload” value=”Upload” />
</form>
my $_FILES[‘picture’][‘tmp_name’] is empty all the time. I tested the same code without the include header wordpress, and it’s working. I think about a reset globals variables on the core of wordpress but i’m not sure.
For testing $_FILE[] I did :
>echo $_FILES[‘picture’][‘tmp_name’]; //empty but on the first line of the script !
>require_once(‘admin.php’);
echo $_FILES[‘picture’][‘tmp_name’]; //empty
>include(‘admin-header.php’);
echo $_FILES[‘picture’][‘tmp_name’]; //empty
>require_once(‘../wp-content/plugins/wp-picture/wp-picture.php’);
thanks,
blobaya