Method One: @
Add the @ sign before any error statements to block!
Method Two: Error_reporting
Add: error_reporting (0) in the first line of the PHP file; can be shielded!
Method Three: Display_errors
Open php.ini file, search display_errors = on, default should be on, change off to block!
<?php
$conn =mysql_connect ("localhost", "root", "root");
[Email Protected]_db_query ("blejtest", "SELECT * from Cblej_company", $conn);
Get query Results
$row =mysql_fetch_row ($result);
Echo ' <font face= ' Verdana > ';
Echo ' <table border= ' 1 "cellpadding=" 1 "cellspacing=" 2 ">";
Show Field names
echo "</b><tr></b>";
for ($i =0; $i <mysql_num_fields ($result); $i + +)
{
Echo ' <td bgcolor= ' #000F00 ><b> '.
Mysql_field_name ($result, $i);
echo "</b></td></b>";
}
echo "</tr></b>";
Navigate to the first record
Mysql_data_seek ($result, 0);
Loop out Records
while ($row =mysql_fetch_row ($result))
{
echo "<tr></b>";
for ($i =0; $i <mysql_num_fields ($result); $i + +)
{
Echo ' <td bgcolor= ' #00FF00 > ';
echo $row [$i];
Echo ' </td> ';
}
echo "</tr></b>";
}
echo "</table></b>";
echo "</font>";
Freeing resources
Mysql_free_result ($result);
Close connection
Mysql_close ($conn);
?>
Function mysql_db_query () is deprecated error resolution