ftp

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jabie5
    First Sergeant

    • Feb 2006
    • 75

    #16
    Re: ftp

    ok i have redone the page and put it on the webpage i had to clear my webcache to see it tho, i hope it is right now lol

    thanks johnny

    Comment

    • jabie5
      First Sergeant

      • Feb 2006
      • 75

      #17
      Re: ftp

      any type of file really mostly jpegs, if you set it to jpegs can i alter it later for any type

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #18
        Re: ftp

        Ok, your script is attached.

        <?php

        // Receiving variables
        @$name = addslashes($_POST['name']);
        @$email_address = addslashes($_POST['email_address']);
        @$browse_Name = $_FILES['browse']['name'];
        @$browse_Size = $_FILES['browse']['size'];
        @$browse_Temp = $_FILES['browse']['tmp_name'];
        @$browse_Mime_Type = $_FILES['browse']['type'];
        function RecursiveMkdir($path)
        {
        if (!file_exists($path))
        {
        RecursiveMkdir(dirname($path));
        mkdir($path, 0777);
        }
        }

        // Validation
        if( $browse_Size == 0)
        {
        header("Location: errorpage.html");
        exit;
        }
        if( $browse_Size >3000000)
        {
        //delete file
        unlink($browse_Temp);
        header("Location: errorpage.html");
        exit;
        }
        $uploadFile = "upload/".$browse_Name ;
        if (!is_dir(dirname($uploadFile)))
        {
        @RecursiveMkdir(dirname($uploadFile));
        }
        else
        {
        @chmod(dirname($uploadFile), 0777);
        }
        @move_uploaded_file( $browse_Temp , $uploadFile);
        chmod($uploadFile, 0644);
        $browse_URL = "http://www.jmbwebdesign.co.uk/upload/".$browse_Name ;
        //Sending Email to form owner
        $pfw_header = "From: $email_address\n"
        . "Reply-To: $email_address\n";
        $pfw_subject = "A New File Has been Uploaded !";
        $pfw_email_to = "youremail@jmbwebdesign.co.uk";
        $pfw_message = "Name: $name\n"
        . "Email_address: $email_address\n"
        . "File Link: $browse_URL\n"
        . "\n";
        *****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
        header("Location: thankyou_page.html");
        ?>







        Please do the following:

        1. The button , for which you have chosen type button simply "button", must be turned into a "submit" button. it's not important that you have named it "Upload now". The name can remain, but it must be a submit button.
        2. You have created an "upload" folder. That's ok, the files will be uploaded there. BUT the form page, as well as this script that i'm sending you, must be published in "public_html", not in "public_html/upload"
        3. The "action" fiels of your form must be set to "upload.php", This is how it invokes the script.
        4. Please note that if the filenames are one word filenames, then the link that you receive in your email will be correct, and you will be able to open the file in IE by simply clicking on the link. If the file name has blanks in it, then the filename on the server is correct, but the link in the email only arrives to the blank space. In this case you should copy all the link and paste it in your browser to open the link. Of course, in all cases, you can also download the file using FTP
        5. To work, the script needs your email address in your Vodahost account, not an external one. So, open the script in Notepad. Change the email address to be your email address on your Vodahost account. Go to Save As. Choose File Type "All Files". Save it as "upload.php". Upload it on your server, in your public_html directory.

        Test the form and let me know.

        I also sent the same message in your email
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • jabie5
          First Sergeant

          • Feb 2006
          • 75

          #19
          Re: ftp

          finally got it to work after 5 attempts lol,
          thanks for your help and patients

          thanks
          johnny

          Comment

          Working...
          X