There was a problem saving the variable. There is an Index.php file, with it ajax'om method POST is sent to the catalog.php variable file, then thanks to this file a folder is created with this name. Then another button is pressed on the index.php, thanks to which the images should be saved to the folder that you just created, but this does not happen, because the variable that is responsible for this is $catalog = "Catalog/".$_POST["saveFolder"]."/";
looks like a Catalog //, i.e. $_POST["saveFolder"]
empty. Tried to save in various ways, but nothing came of it, the variable is overwritten. Is there a way to curb this problem?)
Session used, does not work anyway. I really need help. If anything, I can provide the full code of the files, it is not big.
Update
On the page index.php launched the session. Then, when I entered the folder name in the input and clicked "ok", the field value was transferred to the catalog.php file, where the folder was created. Then, I chose which pictures I want to upload and click upload. Go to the upload.php script, where we save to the created folder. This value of the created folder should be saved somewhere, so as not to be lost. In catalog.php I used the session like this
$_SESSION['fldr'] = $_POST['saveFolder']; $safe = $_SESSION['fldr']; echo $safe; $catalog = "Catalog/".$safe."/"; echo "this is folder".$safe."!";
But gives out
Notice: Undefined index in catalog.php
Tried to enter a check for an empty value if (isset($_POST['saveFolder'])) $a = $_POST['saveFolder'];
but gives such
Notice: Undefined variable: a