qn14
<!DOCTYPE html>
<html>
<head>
<title>Sujit Thapa</title>
</head>
<body>
<?php
$server = "localhost";
$user = "root";
$password = "";
$conn = new mysqli($server,$user,$password);
if($conn->connect_error)
{
die ("Unable to connect to server");
}
$sql = "CREATE DATABASE SUJIT";
$result = $conn->query($sql);
$conn->close();
$database = "SUJIT";
if($conn -> connect_error)
{
die("Unable to connect to database");
}
echo "Connected Successfully";
?>
</body>
</html>
No comments: