Php Connecting to a database


<strong><Html>
<head>
<title> EXAMPLE: Connecting to a database </title>
</head>
<html>
<body>
<span style="color: #ff0000;">
<?php
$conn = mysql_connect("localhost","hnicolassuero","12345678xlz");
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($conn);
?>
</span>
</body>
</html></strong>
You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.