Toodles, y’all! o/ Back again, with another question (I have a feeling that I’m going to be posting here a lot [:P]). I have this code sitting in an html runner-thing (weebly’s html module, to be exact). Technically, it should attempt to connect to my server (yes, all the connection parameters are correct), and return one of two messages depending on wether it connects or not. Unfortunately, nothing happens. At all. Neither string is displayed, even though it’s a clear if/else statement. What might I be doing wrong here? Does the IP need to be more specific than merely localhost? Do I need to attach any scipts to the database somehow? Any help would be much appreciated. [:)]
[php]<?php
$con=mysqli_connect(“localhost”,“Name”,“Password”,“DatabaseName”);
// Check connection
if(mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else
{
print “Hah! Did it”;
}
?>[/php]