When I want to do folder for the member who registered into my site Inside this folder is a folder for photos and the main file of the member. this is problem :-
The first folder is done with the member name successfully but the photo folder and the profile page of the member do not succeed. thank you ..... this is my code I changed the code by the guy who helped me but the same problem exists The first folder is successfully completed The problem is in file settings, folders, images, and index
<?php
$us = "";
if(isset($_POST['username'])){ $us= $_POST['username']; }
if(isset($_POST['username'])){
mkdir("../profiles/$us", 0777, true);
mkdir("../profiles/$us/images", 0777, true);
$filename = "../profiles/$us/index.php";
$ourFileName = $filename;
$ourFileHandle = fopen($ourFileName, 'w');
$written = "
<html>
<body>
<?php
echo \"hi man \";
</body>
</html>
";
fwrite($ourFileHandle, $written);
fclose($ourFileHandle);
$myfile = fopen("../profiles/$us/setting.php", "w") or die("Unable to open file!");
fwrite($myfile, $txt);
$txt = "Minnie Mouse
";
fwrite($myfile, $txt);
fclose($myfile);
} ?>