i test codes using remote connection ot host gator. but have to each time uncomment to swtich it back to connection that would work live on server. is there a solution such as try remote connection catch regular connection?
$conn = mysqli_connect("50.87.155.149", "nadavrock", "xxx", "nadavroc_personal_website");
// $conn = mysqli_connect("localhost", "nadavrock", "xxx", "nadavroc_personal_website");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}