look mate people on here do so either to ask questions or to help; those asking questions (ie you) do so to complete a task etc, those helping (us) do it completely voluntarily. cause it's nice getting some appreciation. SO DON'T BE A CHEEKY MONKEY! and try and explain what you want clearly, and if you're given a pointer, try to learn for yourself - it's really not that hard.
now... back to the matter...
$newfilename=$myrow["username"];
$newfilename=$newfilename.".php";
$newfilename=ereg_replace(" ","_",$newfilename);
$location=pathinfo($_SERVER["SCRIPT_FILENAME"]);
$location=$location["dirname"];
$location = $location . "/" . $myrow["username"];
mkdir($location, 0777)
or die("Could not make directory");