I am trying to utilise a jQuery file upload script( https://github.com/blueimp/jQuery-File-Upload ) to upload multiple images to the server. The php upload script needs to put the images into different folders based on user id and building id. The upload script is integrated into a larger form that records various details about the images and ultimately stores this information with the db. Standalone the script works fine but when integrated within the larger form the I am unable to access the session variable from within the upload class. The following is the offending code. I can confirm that the session variables selected_building and user_id are set but are null within the class. Any help would be greatly appreciated as I have spent about four days trying to resolve this issue.
Hy
Normally, Sessions can be read inside classes, if you add var_dump($_SESSION['user_id']); in the class and returns Null, it is posible to have some code /other script that destroys the session before using that class.
Thanks for your reply. Your were correct, I had to go back to basics and strip out the master page and specifically set the session variables and hey presto the script finally works as intended.
Bookmarks