so i have the following code and is not working
// Make user folder
if (!is_dir('../user/'.$name)) {
$user_folder = mkdir('../user/'.$name, 0777);
$user_index = copy('../login/user.php', '../user/'.$name.'/index.php');
if ($handle_append = fopen('../user'.$name.'index.php', 'w')) {
echo 'Succes opening the file';
} else {
echo 'Error opening the file';
die();
}
$string = 'text to write';
if (fwrite($handle_append, $string)) {
echo 'Succes writing the file';
} else {
echo 'Error writing the file';
die();
}
fclose($handle_append);
$user_inf = copy('../login/user_inf.php', '../user/'.$name.'/user_inf.php');
} else {
echo 'Acest nume de utilizator există deja, te rugăm alege alt nume!';
exit();
}