How to properly replace the_content with the html in a php file?

The reason you still see the content appearing after your HTML is because you are not returning anything in the first block of your if() statement. Obviously, you are outputting the HTML in the signup.php file, but you didn’t override the original content. You can change your code to something like the following to see if you get the result you want:

function overwrite_content($content) {
  if (is_page('Signup')) {
    require_once(plugin_dir_path(__FILE__).'/views/signup.php');
    $content="";
  }
  return $content;
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)