Dross
New Member
I've been fooling around with PHP and MySQL recently and have run into a problem. I am trying to get some really simple php code to call up a mysql table, but I just keep getting error messages. The code is as follows:
<html>
<head>
<title>Test Table</title>
</head>
<body>
<h1>MySQL Test</h1>
<?
//values for $host, $user, $pass are here
mysql_connect($host, $user, $pass);
$db = "test_vote";
mysql_list_tables($db);
?>
</body></html>
the error message I am getting is as follows:
"Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\test_work.php on line 14"
I suspect that the problem isn't in the code, but with MySQL. But MySQL is definitely running and the database "test_vote" does exist. It also might be noteworthy that I'm having no problem using Apache and PHP, it's just when I try to integrate MySQL into the mix. Any help would be appreciated! Thanks!
<html>
<head>
<title>Test Table</title>
</head>
<body>
<h1>MySQL Test</h1>
<?
//values for $host, $user, $pass are here
mysql_connect($host, $user, $pass);
$db = "test_vote";
mysql_list_tables($db);
?>
</body></html>
the error message I am getting is as follows:
"Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\test_work.php on line 14"
I suspect that the problem isn't in the code, but with MySQL. But MySQL is definitely running and the database "test_vote" does exist. It also might be noteworthy that I'm having no problem using Apache and PHP, it's just when I try to integrate MySQL into the mix. Any help would be appreciated! Thanks!