redirect to another html file using php
<p>I currently want to redirect to another HTML file (i.e. dashboard.html) after the user has successfully. I know I can use header to solve this, but I am not sure where should I add it into my code.</p>

<pre><code>if (mysqli_query($Link, $Query)) {
        $lastID = mysqli_insert_id($Link);
        $Query2 = "INSERT INTO $table_2 VALUES (NULL,
        '".$lastID."')";
        if (mysqli_query($Link, $Query2)) {
            $message = "You've sucessfully created the account!";
            echo json_encode(array('success'=&gt;'true', 'action'=&gt;'login','html'=&gt;$message, 'console.log'=&gt;$Query));
        }
        else {
            $message = "Error occur in query2";
            echo json_encode(array('action'=&gt;'error','html'=&gt;$message, 'console.log'=&gt;$Query));
        }
    }
    else {
        $message = "Error in query1";
        echo json_encode(array('action'=&gt;'error','html'=&gt;$message, 'console.log'=&gt;$Query));
    }
</code></pre>

<p>Cheers for your kindly help.</p>