To create a PHP web application that meets the requirements, follow these steps:

1. Set up your development environment: Install XAMPP or any other local server software to run PHP and MySQL on your computer.

2. Create a new folder named "user_form" in the htdocs folder of your XAMPP installation (usually located at C:\xampp\htdocs).

3. Inside the "user_form" folder, create two files: index.php and config.php.

4. Open the config.php file and add the following code to set up the database connection:

```php
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "user_form_db";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
?>
```

5. Open phpMyAdmin from your XAMPP control panel and create a new database called "user_form_db". Then, create a table named "users" with the following columns: id (INT, AUTO_INCREMENT), name (VARCHAR), age (INT), favorite_color (VARCHAR). Set 'id' as the primary key.

6. Now open the index.php file and add the following code:

```php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>User Form</title>
</head>
<body>
    <?php
    require_once 'config.php';

    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $name = $_POST['name'];
        $age = $_POST['age'];
        $favorite_color = $_POST['favorite_color'];

        $errors = [];

        if (!preg_match("/^[a-zA-Z ]*$/", $name)) {
            $errors[] = "Only letters and white space allowed in name";
        }

        if ($age < 18 || $age > 99) {
            $errors[] = "Age must be between 18 and 99";
        }

        $allowed_colors = ['red', 'blue', 'green', 'yellow', 'purple'];
        if (!in_array($favorite_color, $allowed_colors)) {
            $errors[] = "Invalid favorite color. Allowed colors: red, blue, green, yellow, purple";
        }

        if (empty($errors)) {
            $stmt = $conn->prepare("INSERT INTO users (name, age, favorite_color) VALUES (?, ?, ?)");
            $stmt->bind_param("sis", $name, $age, $favorite_color);
            $stmt->execute();

            echo "<p>Success! Data has been saved.</p>";
        } else {
            echo "<ul>";
            foreach ($errors as $error) {
                echo "<li>$error</li>";
            }
            echo "</ul>";
        }
    }
    ?>

    <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
        <label for="name">Name:</label>
        <input type="text" id="name" name="name" required><br>

        <label for="age">Age:</label>
        <input type="number" id="age" name="age" min="18" max="99" required><br>

        <label for="favorite_color">Favorite Color:</label>
        <select id="favorite_color" name="favorite_color" required>
            <option value="">Select a color</option>
            <option value="red">Red</option>
            <option value="blue">Blue</option>
            <option value="green">Green</option>
            <option value="yellow">Yellow</option>
            <option value="purple">Purple</option>
        </select><br>

        <input type="submit" value="Submit">
    </form>
</body>
</html>
```

This code creates the form and handles validation, error messages, and saving data to the database.

7. Start your XAMPP server and open a web browser. Navigate to http://localhost/user_form/ to view and test your PHP web application.
요구 사항을 충족하는 PHP 웹 애플리케이션을 만들려면 다음 단계를 따르세요.

1. 개발 환경을 설정합니다: 컴퓨터에서 PHP 및 MySQL을 실행할 수 있도록 XAMPP 또는 기타 로컬 서버 소프트웨어를 설치합니다.

2. XAMPP 설치의 htdocs 폴더(일반적으로 C:\xampp\htdocs에 위치)에 "user_form"이라는 이름의 새 폴더를 만듭니다.

3. "user_form" 폴더 안에 index.php와 config.php.

4의 두 파일을 생성합니다. config.php 파일을 열고 다음 코드를 추가하여 데이터베이스 연결을 설정합니다:

```php
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "user_form_db";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
?>
```

5. XAMPP 제어판에서 phpMyAdmin을 열고 "user_form_db"라는 새 데이터베이스를 생성합니다. 그런 다음 다음과 같은 열을 사용하여 "users"라는 이름의 테이블을 만듭니다: id (INT, AUTO_INCREMENT), name (VARCHAR), age (INT), favorite_color (VARCHAR). 'id'를 기본 키로 설정합니다.

6. 이제 index.php 파일을 열고 다음 코드를 추가합니다:

```php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>User Form</title>
</head>
<body>
    <?php
    require_once 'config.php';

    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $name = $_POST['name'];
        $age = $_POST['age'];
        $favorite_color = $_POST['favorite_color'];

        $errors = [];

        if (!preg_match("/^[a-zA-Z ]*$/", $name)) {
            $errors[] = "Only letters and white space allowed in name";
        }

        if ($age < 18 || $age > 99) {
            $errors[] = "Age must be between 18 and 99";
        }

        $allowed_colors = ['red', 'blue', 'green', 'yellow', 'purple'];
        if (!in_array($favorite_color, $allowed_colors)) {
            $errors[] = "Invalid favorite color. Allowed colors: red, blue, green, yellow, purple";
        }

        if (empty($errors)) {
            $stmt = $conn->prepare("INSERT INTO users (name, age, favorite_color) VALUES (?, ?, ?)");
            $stmt->bind_param("sis", $name, $age, $favorite_color);
            $stmt->execute();

            echo "<p>Success! Data has been saved.</p>";
        } else {
            echo "<ul>";
            foreach ($errors as $error) {
                echo "<li>$error</li>";
            }
            echo "</ul>";
        }
    }
    ?>

    <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
        <label for="name">Name:</label>
        <input type="text" id="name" name="name" required><br>

        <label for="age">Age:</label>
        <input type="number" id="age" name="age" min="18" max="99" required><br>

        <label for="favorite_color">Favorite Color:</label>
        <select id="favorite_color" name="favorite_color" required>
            <option value="">Select a color</option>
            <option value="red">Red</option>
            <option value="blue">Blue</option>
            <option value="green">Green</option>
            <option value="yellow">Yellow</option>
            <option value="purple">Purple</option>
        </select><br>

        <input type="submit" value="Submit">
    </form>
</body>
</html>
```

이 코드는 양식을 생성하고 유효성 검사, 오류 메시지 및 데이터베이스에 데이터 저장을 처리합니다.

7. XAMPP 서버를 시작하고 웹 브라우저를 엽니다. http://localhost/user_form/ 로 이동하여 PHP 웹 애플리케이션을 보고 테스트합니다.