I am trying to connect to MySQL and get the following Fatal Error:
Fatal error: Cannot instantiate non-existent class: mysqli in C:\Documents and Settings\RLane\My Documents\Web Sites\Localhost\InDevelopment\Wellington\Source\11\results.php on line 26
The code that is generating this is here:
<html>
<head>
<title>Book-O-Rama Search Results</title>
</head>
<body>
<h1>Book-O-Rama Search Results</h1>
<?php
// create short variable names
$searchtype=$_POST['searchtype'];
$searchterm=$_POST['searchterm'];
$searchterm= trim($searchterm);
if (!$searchtype || !$searchterm)
{
echo 'You have not entered search details. Please go back and try again.';
exit;
}
if (!get_magic_quotes_gpc())
{
$searchtype = addslashes($searchtype);
$searchterm = addslashes($searchterm);
}
echo "Searching for: $searchterm" ;
$db = new mysqli('localhost', 'bookorama', 'bookorama123', 'books');
For some reason it is choking on the
$db = new mysqli('localhost', 'bookorama', 'bookorama123', 'books');
line.
I just loaded MySQL5 and I can access the database from the command line with mysql. Do I have to do something special to enable mysqli ?