 <p>Yeh I got it, thanks @jeff for the clue, here is the answer.</p> <p>remove the "echo" error from the string</p> <pre><code> { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } </code></pre> <p>its look like this;;</p> <pre><code> { . mysqli_connect_error(); } </code></pre>