Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 08-23-2013, 11:28 AM   #1
srockhard
Retired
 
srockhard's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: PDXXX
Posts: 1,976
Need a Help with Form

My form works great but I can't get the user submitted images to save to my server or display in the email that I receive once form is submitted. What is wrong here:

Code:
    $allowed_extensions = array("jpg", "jpeg", "gif", "bmp", "png");

    //Get the uploaded file information

    $name_of_uploaded_file =  basename($_FILES['photo']['name']);

    //get the file extension of the file

    $type_of_uploaded_file = substr($name_of_uploaded_file, strrpos($name_of_uploaded_file, '.') + 1);

    $size_of_uploaded_file = $_FILES["photo"]["size"]/1024;//size in KBs     

     //copy the temp. uploaded file to uploads folder

    $path_of_uploaded_file = $_SERVER['DOCUMENT_ROOT'] .'/' . $name_of_uploaded_file;

    $tmp_path = $_FILES["photo"]["tmp_name"];

    if(is_uploaded_file($tmp_path))

    {

      if(!copy($tmp_path,$path_of_uploaded_file))

      {

        $errors .= '\n error while copying the uploaded file';

      }

    }
__________________
Piper Pines
srockhard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 09-01-2013, 04:10 PM   #2
fendlestick
Confirmed User
 
Industry Role:
Join Date: Dec 2012
Posts: 117
Didnt read the code, but maybe the issue is with your upload folder permissions as they always sux.
fendlestick is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 09-26-2013, 09:20 AM   #3
AMSM
Guest
 
Posts: n/a
double check the words 'photo' 'name' and 'size' are the same words as in the html on the front end form, that usually gets me.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 10-16-2013, 04:47 AM   #4
nin
Registered User
 
nin's Avatar
 
Industry Role:
Join Date: Aug 2013
Location: Spain, Barcelona
Posts: 67
do not try to check all the code, find the place where you loose your file -

from the begining:
die($name_of_uploaded_file); will give you the name of the file or you are not receiving it on the server at all?

if you have the file - try to use "move_uploaded_file"

include all the checkings, renamings, filters only after you will solve the main problem - getting your file in the place it should appear.
nin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.