ashii Posted April 4, 2009 Share Posted April 4, 2009 it will be easy if make ma problem into points... am havin a php file .. i create a session with the value eg: Ashii i am having a file upload function in that php file..... now i select the file and press the upload button.... then the file should be uploaded into a folder... upto this am fyn.. itz perfectly workin.... ma problem is........... i should upload the file.. to the folder which has the similar name of sessions value... eg: the file shud be uploded to the Ashii Folder... it shud recognize that the file should be uploded to the relevant folder using the sessions... $path='/upload/'; move_uploaded_file($_FILES["file"]["tmp_name"], $path" . $_FILES["file"]["name"]); the above code is to upload a file in a particular folder called ''upload'... it wotkz perfectly.... but i need t in the otherway.... plz plz plz plz help me.......... Quote Link to comment https://forums.phpfreaks.com/topic/152588-using-sesions-in-php/ Share on other sites More sharing options...
ashii Posted April 5, 2009 Author Share Posted April 5, 2009 Any ideas Plz ??? ??? ??? ??? ??? ??? Quote Link to comment https://forums.phpfreaks.com/topic/152588-using-sesions-in-php/#findComment-801548 Share on other sites More sharing options...
MatthewJ Posted April 5, 2009 Share Posted April 5, 2009 <?php $path="/$_SESSION['yoursessionvar']/"; move_uploaded_file($_FILES["file"]["tmp_name"], $path . $_FILES["file"]["name"]); ?> Quote Link to comment https://forums.phpfreaks.com/topic/152588-using-sesions-in-php/#findComment-801554 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.