• 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)
Viewing 1 replies (of 1 total)
  • The topic ‘Image upload script’ is closed to new replies.