I have a form, where I submit the data to $_POST['foldername']
createdir.php below
<form action="mkdir.php">
<input type="textarea" name="foldername" id="foldername">
<input type="submit" value="Create directory">
</form>
Then I have mkdir() that should have a path including the name got from a input field, but the problem is, that it doesn’t get the data from input. I tried to print it as well, but all I get is /images/ but I should (at least I hope to) get /images/nameFromInput.
mkdir.php below
<?php
$foldername = $_POST['foldername'];
$path = 'images/' . $foldername;
mkdir($path);
header('Location:createdir.php')
?>
Where’s the problem?
You forgot the method.