Can't figure out this error!

Can't figure out this error!

I'm trying to make something where a user selects an option from a drop down menu.  When an option is selected, another drop down menu appears with a new set of options (based on/related to what the first drop down selection was).  Then after selecting from the second drop down menu, a third one appears (again, contingent on what was selected in the one prior to that).  This continues down the line until there's no more options.  All drop downs are populated from MySQL relational database tables.

I have the first drop and second down menus working.  I put virtually the same code (a few minor obvious variable name changes) to have the third drop down menu appear, but I'm getting this error:
Fatal error: Call to undefined function mysql_get_last_message() in C:\htdocs\jQuery\configurator\draw_third_select.php on line 15
It's not making sense to me, since it's (almost) the same code as what makes the first two menus work!  This is my first foray into jQuery, so any help would be GREATLY appreciated.  Thanks!  Here's what I have so far:

configurator.php - (main page):
  1. <?php require_once('Connections/connection.php'); ?>
    <?php
    /********************************************************************************************/

    // *** Get a list of level1 items in the database to populate the first drop-down menu with
    mysql_select_db($database_db, $db);
    $query_level1 = "SELECT *
                     FROM level1
                     ORDER BY value";

    // *** Execute select statement to retrieve categories ***
    $level1 = mysql_query($query_level1, $db) or die(mssql_get_last_message());
    // *** Fetch row ***
    $row_level1 = mysql_fetch_assoc($level1);

    /********************************************************************************************/
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="js/jquery-min.js"></script>
    <script type="text/javascript">
    // *** First drop-down menu functionality *** //
    $(document).ready(function () {
        $("#First_SelectID").change(function() {
            if ($("#First_SelectID").val() != "0") {
                $('#Second_SelectID').show();
                $.ajax({
                    type: "POST",
                    url: "draw_second_select.php",
                    data: "first_value=" + $('#First_SelectID').val(),
                    success: function(msg){
                        $('#Second_SelectID').html(msg);
                    } // end success
                }) // end ajax
            } else {
                $('#Second_SelectID').hide();
            } // end if
        });  // end change function
    });

    // *** Second drop-down menu functionality *** //
    $(document).ready(function () {
        $("#Second_SelectID").change(function() {
            if ($("#Second_SelectID").val() != "0") {
                $('#Third_SelectID').show();
                $.ajax({
                    type: "POST",
                    url: "draw_third_select.php",
                    data: "second_value=" + $('#Second_SelectID').val(),
                    success: function(msg){
                        $('#Third_SelectID').html(msg);
                    } // end success
                }) // end ajax
            } else {
                $('#Third_SelectID').hide();
            } // end if
        });  // end change function
    });
    </script>
    <title>Test configurator</title>
    </head>

    <body>
    <select name="First_Select" id="First_SelectID">
        <option value="0">--SELECT AN OPTION--</option>
        <?php
        do { ?>
            <option value="<?php echo $row_level1['id1']?>"><?php echo $row_level1['value']?></option>
        <?php
        } while ($row_level1 = mysql_fetch_assoc($level1));
            mysql_data_seek($level1, 0);
            $row_level1 = mysql_fetch_assoc($level1);
        ?>
    </select>

    <div id="Second_SelectID"></div>

    <div id="Third_SelectID"></div>
    </body>
    </html>

















































































draw_second_select.php - (makes second drop down menu appear):

  1. <?php require_once('Connections/connection.php'); ?>
    <?php
    /********************************************************************************************/

    $val1 = $_POST['first_value'];

    // *** Get a list of level2 items in the database to populate the first drop-down menu with
    mysql_select_db($database_db, $db);
    $query_level2 = "SELECT *
                     FROM level2
                     WHERE id1 = " . $val1 . "
                     ORDER BY value";

    // *** Execute select statement to retrieve categories ***
    $level2 = mysql_query($query_level2, $db) or die(mysql_get_last_message());
    // *** Fetch row ***
    $row_level2 = mysql_fetch_assoc($level2);

    /********************************************************************************************/

    $html = '<br /><select name="Second_Select">' . "\n";
    $html .= '<option value="0">--SELECT AN OPTION--</option>';
    do {
        $html .= '<option value="' . $row_level2['id2']. '">' . $row_level2['value']. '</option>';
    } while ($row_level2 = mysql_fetch_assoc($level2));
        mysql_data_seek($level2, 0);
        $row_level2 = mysql_fetch_assoc($level2);
        $html .= '</select>' . "\n";
    echo $html;
    exit();
    ?>






























draw_third_select.php - (SHOULD make third drop down menu appear):

  1. <?php require_once('Connections/connection.php'); ?>
    <?php
    /********************************************************************************************/

    $val2 = $_POST['second_value'];

    // *** Get a list of level3 items in the database to populate the second drop-down menu with
    mysql_select_db($database_db, $db);
    $query_level3 = "SELECT *
                     FROM level3
                     WHERE id2 = " . $val2 . "
                     ORDER BY value";

    // *** Execute select statement to retrieve categories ***
    $level3 = mysql_query($query_level3, $db) or die(mysql_get_last_message());
    // *** Fetch row ***
    $row_level3 = mysql_fetch_assoc($level3);

    /********************************************************************************************/

    $html = '<br /><select name="Third_Select">' . "\n";
    $html .= '<option value="0">--SELECT AN OPTION--</option>';
    do {
        $html .= '<option value="' . $row_level3['id3']. '">' . $row_level3['value']. '</option>';
    } while ($row_level3 = mysql_fetch_assoc($level3));
        mysql_data_seek($level3, 0);
        $row_level3 = mysql_fetch_assoc($level3);
        $html .= '</select>' . "\n";
    echo $html;
    exit();
    ?>






























Connections/connection.php - (script to connect to database):

  1. <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_db = "localhost";
    $database_db = "configurator";
    $username_db = "my_local_username";
    $password_db = "my_local_password";

    $db = mysql_pconnect($hostname_db, $username_db, $password_db) or trigger_error(mysql_error(),E_USER_ERROR);
    $conn = new mysqli($hostname_db, $username_db, $password_db, 'configurator') or die('Cannot open database');
    ?>











Table "level1" - structure:



Table "level1" - content:


Table "level2" - structure:


Table "level2" - content:


Table "level3" - structure:


Table "level3" - content:


That's all I've got.  Sorry for the long post, but I wanted to be as detailed as possible.  I would be SO thankful for any help.  I'm really struggling with this one!  THANKS!!!