Practical 19 : Write a PHP program for connection with My Sql.
<?php ob_start(); ?>
<html>
<head>
<title>Practical : 19</title>
</head>
<body>
<?php
$conn=mysql_connect("localhost","root","");
//or die("Not Connect To MySQL");
mysql_select_db("Student_DB");
//or die("Not Connect To Database");
if(!$conn)
{
echo "<center><h2>MySQL Not Connected</h2></center>";
}
else
{
echo "<center><h2>MySQL Connected</h2></center>";
}
?>
</body>
</html>
<?php ob_flush(); ?>

EmoticonEmoticon