Page 1 of 1
Posted: Fri Jul 25, 2003 10:04 am
surely calling the select $directory as well will effectively overwrite the input text with ""
try naming the text field name="make_directory"
Code: Select all
$dir = $_POST['directory'];
if($_POST['make_directory'] !== "")
$dir = $_POST['make_directory'];
Posted: Fri Jul 25, 2003 1:12 pm
so you named the form fields differently?
I presume you've tried echoing the $_POST variables to check they exist?
you should have a value for 'make_directory' if you typed anything, or a value for 'directory' if you selected something
Posted: Sat Jul 26, 2003 2:19 am
ok - my codes use reg_globals OFF (which is default since php4.2) - yours use the older approach of accessing post/file/get etc variables through the global scope - eg $varname rather than $_POST['varname'];
either recode the bit I did to use the older method (which undoubtedly will have to be updated as soon as your host switches reg_globals off)
or update all your code bits to access the variables through the $_FILES or $_POST array scopes.
Read this [age
to learn how to access the files array variables.