flashwiz Posted April 11, 2009 Share Posted April 11, 2009 hey guys, I am passing a variable from flash through query sting to php and i have a lil question; I am passing, http://www.domain.com/phpfile.php?var=value Now I know that I can get the the value of var using this: $_GET['var']; my question is how can I change the folder name in this script from "files" to the content of var? <?php if(!is_dir("./files")) mkdir("./files", 0755); move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files/".$_FILES['Filedata']['name']); chmod("./files/".$_FILES['Filedata']['name'], 0777); ?> Thanks Link to comment https://forums.phpfreaks.com/topic/153635-simple-php-syntax-question/ Share on other sites More sharing options...
wildteen88 Posted April 11, 2009 Share Posted April 11, 2009 First grab the variable from the url $folder = $_GET['var']; Now just replace "./files" with "./$folder" Link to comment https://forums.phpfreaks.com/topic/153635-simple-php-syntax-question/#findComment-807313 Share on other sites More sharing options...
flashwiz Posted April 11, 2009 Author Share Posted April 11, 2009 thanks... Link to comment https://forums.phpfreaks.com/topic/153635-simple-php-syntax-question/#findComment-807333 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.