PHP перенаправление на другую страницу

Всем привет, при входе в аккаунт должно происходит перенаправление на другую страницу, но выходит ошибка: Warning: Cannot modify header information - headers already sent by (output started at /var/www/u1724412/data/www/vpopi.site/index.html:1) in /var/www/u1724412/data/www/vpopi.site/login.php on line 11

Вот код PHP:

'''
<?php
    include 'rb.php';
    include 'index.html';
    // session_start();
    if(isset($_POST['bt2'])){
        R::setup( 'mysql:host=localhost;dbname=u1724412_default', 'u1724412_holod19', 'cbybtxfcs-5' );
        $user = R::findOne('user', 'login=?', [$_POST['username']]);
        if($user){
            if(password_verify($_POST['password'], $user->password)){
                // header('location: forum-dvoryashin.ru?username2=' .$_POST['login']);
                header('Refresh: 5; URL=forum-dvoryashin.ru/index.php');
            }
        }
    }
?>
'''

Помогите пожалуйста.


Ответы (0 шт):