Got lost some where

I am going through the book Build your database driven website using php and mysql. I am in chap. 4 where you connect to the database and I got this error message when I tried to connect to the database. Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2. I followed the book and I do not see any typos or anything. here is my code I am using.


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
              <html xmlns="http://www.w3.org/1999/xhtml"> 
              <head>
                <title>PHP Output</title>
               <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
               
               </head>

     
              <body>
                <p>
                  <?php echo $output; ?>
                </p>
            
              </body>
              </html>

this is the output html I am using
and this is my php code.


  <?php
      $link = mysqli_connect('localhost', 'root', '1984jrg');
      if (!$link)
      {
        $output = 'Unable to connect to the database server.';
        include 'output.html.php';
        exit();
      }
      if (!mysqli_set_charset($link, 'utf8'))
      {
	      $output = 'Unable to set database connection encoding.';
	      include 'output.html.php';
	      exit();
     }
      if (!mysqli_select_db($link, 'ijdb'))
      {
	      $output = 'Unable to locate the joke database.';
	      include 'output.html.php';
	      exit();
      }
      
      $output = 'Database connection established.';
      include 'output.html.php';
      ?>

this is my index page.
All help greatly appreciated.

You probably just need to enable the mysqli extension for PHP.
Open your php.ini file and look for this line:


extension=php_mysqli.dll

Uncomment it, and restart Apache.

If you don’t know where your php.ini file is create a php file with this code, and run it in the browser:


<?php
phpinfo();

Thank you cranial-bore I went back through my php.ini file and found I had uncommented my extension=php_mysqli.dll line so I went back though all the steps I had taken to set up my php.ini and found I had typed extension_dir= "C:\“PHP\ext” when it should have been extension_dir = “C:\PHP\ext”. Thank you.