mjahkoh Posted February 20, 2009 Share Posted February 20, 2009 I am using Jpmaster77 login system and Upload File Class from Jeffrey M. Johns The error I am getting when updating the database after uploading is below. Somehow $session->username is not even available in upload.php where it uploads in the root Dir instead of the logged in usernames directory error Fatal error: Call to a member function updatePictureUrl() on a non-object in C:\xampp\htdocs\KukBuz\include\upload.php on line 618 //index.php include "include/session.php"; if (trim($_FILES['property1']['tmp_name']) ) { include "include/upload.php"; $upload_class = new Upload_Files; include "uploads/uploadinclude.php"; } //end of index.php //start uploadinclude.php //include "include/session.php"; $upload_class->StartUploadfiles(); //end uploadinclude.php //start procUploadValid function in upload function procUploadValid($fieldname,$fileNo){ //$upload_class->temp_file_name = trim($_FILES['mypassport']['tmp_name']); //$upload_class->file_name = trim(strtolower($_FILES['mypassport']['name'])); //$upload_class->upload_dir = "images/passports"; //$upload_class->upload_log_dir = "uploads/upload_logs/"; $this->max_file_size = 5242880; $this->banned_array = array(""); $this->ext_array = array(".jpg",".jpeg"); $this->Imagedim_array = array("200","200"); $this->upload_class->Imagedim_array = array("200","400"); $upload_files= $this->upload_file_with_validation(true,true,true,true); if ($upload_files!='true') { $result =$upload_files. "Your file could not be uploaded!"; } else { $extension = strtolower(strrchr($_FILES['mypassport']['name'],".")); $database->updatePictureUrl("mjahkoh","picture1url","fgfgfg"); $result =$result. "file uploaded."."\n"; } return true; } //end procUploadValid Quote Link to comment https://forums.phpfreaks.com/topic/146112-functions-not-visible/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.