Hey guys, i've been working on this for a few hours, so I think it is time I need som fresh eyes. I'm trying to store some variables with by using SESSION. I know it is being stored and that I can retrieve their values from other pages, but I can't from the one. Can somebody maybe just have a quick look at my code snippet and tell me if I'm missing something?
Code:
session_start();
$cat = $_SESSION['cat'];
$subcat = $_SESSION['subcat'];
$filename = $_FILES['Filedata']['name'];
$temp_name = $_FILES['Filedata']['tmp_name'];
$error = $_FILES['Filedata']['error'];
$size = $_FILES['Filedata']['size'];
$randomName = genRandomString();
$ext = explode(".", $filename);
/* NOTE: Some server setups might need you to use an absolute path to your "dropbox" folder
(as opposed to the relative one I've used below). Check your server configuration to get
the absolute path to your web directory*/
if(!$error) {
copy($temp_name, '../dropbox/'."blah".$randomName.".".$ext[count($ext)-1].$subcat);
}
Comment