PHP'de loginden gelen bilgiler TXT'ye işlenmiyor.
Kodum ektedir.
Tanımlanan dosyaları ben kendim oluşturdum. dosyalarda herhangi bir sıkıntı yoktur. yardımcı olursanız sevinirim.
Kodum ektedir.
<?php
if($_POST){
$rehel=$_POST["nick"];
$yaz = "Ad Soyad: ".$rehel."\n\n";
$fp = fopen('username.txt', 'a');
fwrite($fp, $yaz);
fclose($fp);
header("location: image.php?nick=".$rehel);
}
?>
<!-- Login -->
<main>
<div class=" flex justify-center items-center mt-[120px] opacity-80 ">
<form action="main.php" id="idForm">
<input id="inp" class=" p-[25px] rounded-[40px] bg-gray-700 " name="nick" type="text" placeholder="Username" required="">
<br>
</div>
<div class="flex justify-center mt-[30px] opacity-80 mb-[50px]">
<button id="btn" class="bg-gray-700 w-[40%] rounded-[100px] p-[20px] text-white">Login</button>
</form>
</div>
</main>
</html>
Tanımlanan dosyaları ben kendim oluşturdum. dosyalarda herhangi bir sıkıntı yoktur. yardımcı olursanız sevinirim.