-
Posts
3 -
Joined
-
Last visited
Posts posted by nadav_rock
-
-
i am new to php. can you give me the code for the simple if else statment?
-
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);
}
how to try a remote connection host gator and if fails connect by localhost
in MySQL Help
Posted
i know what an if else statement is. i dont know what you meant by $_SERVER['HTTP_HOST']. can you give me a working code?