<?php require_once('../../Connections/hadithbd.php'); ?>
should be this:
<?php require('../../Connections/hadithbd.php'); ?>
Or you could just carry it over as a global variable like:
<?php
global $hadithbd;
?>
I change the connection to <?php require('../../Connections/hadithbd.php'); ?> and uploaded the file newly, now no error is showing but mail also not going too, it is neither shows a success message nor anything just browser shows it is loading for infinity