In your connect.php there is a fatal error, it doesn't even start, you have "if(empty($host))" but you never defined it, to retrieve info that comes from post data you have to use $_POST['host'] or you can use these three lines at the beginning of connect.php:
In your connect.php there is a fatal error, it doesn't even start, you have "if(empty($host))" but you never defined it, to retrieve info that comes from post data you have to use $_POST['host'] or you can use these three lines at the beginning of connect.php:
$host = $_POST['host'];
$username = $_POST['username'];
$userpasswd = $_POST['userpassword'];