i've come back to php and MySQL after I stopped coding,i still have the basics down, and i'm using old projects as a crutches,and I'm reusing some old files(like the ones made to generate a mysqli connection),I saved it in a file called 'conex.php'
$servername = "localhost";
$username = "root";
$password = "pass";
$base="base:name";
$conn = new mysqli($servername, $username, $password,$base);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
and it still works on the old project that I took it from, but now, when I open index.php that looks like this :
<?php
include "conex.php";
echo "<html>
<header></header>
<body>";
//some random echo html
echo"</body>";
?>
i get this displayed on browser:
connect_error) { die("Connection failed: " . $conn->connect_error); } ?>
So i do not know what is wrong as I am quite rusty and can't get the exact error number