I am making a website and I am getting data from my database(local database for testing of course) and for some reason, the two letter st
won't show up on my browser. I am using PHP and MySQL with phpMyAdmin.
I have tried this with several words like: "Test" just shows "Te", "String" just shows "ring" and even with st in the middle of a word like "Abstract" just shows "Abract". I have tried searching for answers but i couldn't find anything at all!
$DBConnect = mysqli_connect("127.0.0.1", "root", "");
if ($DBConnect === FALSE) {
echo "<p>Unable to connect to the database server.</p>" . "<p>Error code " . mysqli_errno() . ": " . mysqli_error() . "</p>";
} else {
$DBName = "cms";
$TableName = "messages";
if (!mysqli_select_db($DBConnect, $DBName)) {
echo "<p>Unable to connect to the $DBName database!</p>";
} else {
$SQLstring = "SELECT * FROM $TableName";
$sql = mysqli_query($DBConnect, $SQLstring);
$Message = mysqli_fetch_array($sql);
if ($Message === FALSE) {
echo "Unable to execute the query." . "Error code " . mysqli_errno($DBConnect) . ": " . mysqli_error($DBConnect) . "";
} else if (mysqli_num_rows($sql) == 0) {
echo "<h1>School of Healthcare and Wellbeing</h1>";
} else {
echo "<h1>" . $Message['message'] . "</h1>";
}
}
}