Hi everyone,
Here is a simple PHP code aimes to connect into a MySql server.
I'm trying to format error messages in a way my page will continue working despite errors that occure.
Here's the css code:
In return I get error message that takes me out of my page and is inconsistent with the css
Here is a simple PHP code aimes to connect into a MySql server.
I'm trying to format error messages in a way my page will continue working despite errors that occure.
Code:
<?php
$con=mysqli_connect("localhost","root","root4qpines","tivonidb");
if (mysqli_connect_errno($con))
{
echo
'<p class="SQLerror">';
echo "Failed to connect to MySQL: " . mysqli_connect_error();
echo
'</p>';
}
else
{
echo
'<p class="SQLerror">';
echo "Success connecting to MySQL! " ;
echo
'</p>';
}
?>
Code:
p.SQLerror
{
width:447px;
height:363px;
background-color: #fd0303;
}