$email_acc = file_get_contents("../../acc/$id/info/email.dat"); $pass_acc = file_get_contents("../../acc/$id/info/pass.dat"); $nickname_acc = file_get_contents("../../acc/$id/info/nickname.dat");
../../acc/$id/info/
- this is the path with the data from the account
if the password and login do not match, everything is fine - it writes the "wrong password", but if I enter it correctly, it writes
Warning: Cannot modify header information - headers already sent by (output started at "путь":49) in "путь" on line 83 Warning: Cannot modify header information - headers already sent by (output started at "путь":49) in "путь" on line 84 Warning: Cannot modify header information - headers already sent by (output started at "путь":49) in "путь" on line 85<br> на этих линиях код такой: <br> setcookie("id","$id", time() + 99999999, "/");<br> setcookie("nickname","$nickname_acc", time() + 99999999, "/");<br> header( 'Location: ../../', true, 307 ); <form action='index.php' method='post'> <input type='email' name='email'> <input type='password' name='pass'> <input type='submit'> </form>
if($_POST) { $count_id = file_get_contents('../register/count_id.dat'); for($i=1; $i<$count_id; $i++) { $id = "id".$i; $email_acc = file_get_contents("../../acc/$id/info/email.dat"); $pass_acc = file_get_contents("../../acc/$id/info/pass.dat"); $nickname_acc = file_get_contents("../../acc/$id/info/nickname.dat"); if($pass == $pass_acc and $email == $email_acc) { setcookie("id","$id", time() + 99999999, "/"); setcookie("nickname","$nickname_acc", time() + 99999999, "/"); header( 'Location: ../../', true, 307 ); break; echo "ok"; } else { echo ' <h4>Неправильний логін або пароль!</h4> '; } } } ?>[![весь код простите что украинский делаю укр сайт][1]][1]