Title: Image upload script
Last modified: August 19, 2016

---

# Image upload script

 *  [stevenoi](https://wordpress.org/support/users/stevenoi/)
 * (@stevenoi)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/image-upload-script-1/)
 * Hi, I found this script, about uploading images via the theme options page.
 *     ```
       if ($_FILES["logo"]["type"]){
       $directory = dirname(__FILE__) . "/upload/";
       move_uploaded_file($_FILES["file-logo"]["tmp_name"],
       $directory . $_FILES["logo"]["name"]);
       update_option('logoimage', get_option('siteurl'). "/wp-content/themes/". get_option('template')."/upload/". $_FILES["file-logo"]["name"]);
       }
       ```
   
 * So, I only can upload images if the option ID is “logoimage”. But I want to upload
   images with more than one ID, without duplicating the script everytime, and changes
   the types.
 * – Hope you can help ! Steven.

Viewing 1 replies (of 1 total)

 *  Thread Starter [stevenoi](https://wordpress.org/support/users/stevenoi/)
 * (@stevenoi)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/image-upload-script-1/#post-1121277)
 * bump

Viewing 1 replies (of 1 total)

The topic ‘Image upload script’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [stevenoi](https://wordpress.org/support/users/stevenoi/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/image-upload-script-1/#post-1121277)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
