I got this error when I try to run the PHP file. Anyone knows what is wrong?
Here's the error message:
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\db_connect.php on line 3
The code:
<?
$connection = mysql_connect("localhost","sandman","metallica") or
die("Couldn't connect.");
if ($connection) {
$msg = "Success!";
}
?>
<html>
<head>
<title>MySQL Connection</title>
</head>
<body>
<? echo "$msg"; ?>
</body>
</html>