This topic is locked

upload files to users folders

6/2/2011 6:17:31 PM
PHPRunner General questions
pplaut author

Hi-

I want to upload pdf files to a users individual folder name below the files folder.

The tutorial specifies- to before record added or updated put the following..

http://xlinesoft.com/phprunner/docs/upload_files_to_users_folders.htm

My questions are:
From the tutorial

$FILES["value)

I have a txt field [color="#FF0000"]dtPetTrackerInvUpload

So my code looks like this...

if($pageObject->filesToMove[$key]->sourceFilename==$_FILES["value_dtPetTrackerInvUpload_1"]["tmp_name"])
My bigger question is...

From the tutorial:

//create directory if not exist

$dirname= "files/".$_SESSION[";

I have:

$dirname= "files/".$_SESSION["[color="#FF0000"]CustD"];

CustID is the field name in the dtPetTrackerVetVisits table
The directory is not being created below the files directory.
Thanks!

Peer

Sergey Kornilov admin 6/3/2011

$_SESSION["UserID"] variable is populated automatically. If you want to use another session variable like $_SESSION["CustD"] you need to populate it automatically using one of event i.e. AfterSuccessfulLogin.