i m developing a word press plugin and want to create a admin panel with html form and once user submit details a success message will appear and a json file with name manifest.json will be created in plugin directory i have just started php .
 this is my form on admin pannel
`

```
<form name="postform" action="" method="post" enctype="multipart/form-data">
        <table style="border:2px solid #444; width:100%;" id="manifestedit">
            <tbody>
                <tr>
                <td>Name:</td>
                <td><input type="text" name="name" placeholder="abc"></td>
                </tr>
                <tr>
                <td>Short Name:</td>
                <td>
                <input type="text" name="short_name" placeholder="abc"></td>
                </tr>
                <tr>
                <td>Description:</td>
                <td><textarea id="text" rows="5" cols="30" type="text" name="description">Progressive Web App Tool</textarea>
                </td>
                </tr>
                <tr>
                <td>Orientation</td>
                <td><input type="text" name="orientation" placeholder="portrait"></td>
                </tr>
                <tr>
                <td>Start_url</td>
                <td><input type="text" name="start_url" placeholder="/"></td>
                </tr>
                <tr>
                <td>Display</td>
                <td><input type="text" name="display" placeholder="standalone"></td>
                </tr>
                <tr>
                <td>background_color</td>
                <td><input type="text" name="background_color" placeholder="#fff"></td>
                </tr>
                <tr>
                <td>theme_color</td>
                <td><input type="text" name="theme_color" placeholder="#fff"></td>
                </tr>
                <tr>
                <td>icons</td>
                <td>
                <table id="icondet">
                    <tr>
                    <td>src</td>
                    <td><input type="url" name="src" placeholder="https//:abc/resource/image/addToHome/android-chrome-192x192.png"></td>        </tr>
                    <tr>
                        <td>sizes</td>
                        <td> <input type="text" name="sizes" placeholder="192x192"></td>
                    </tr>
                    <tr>
                    <td>types</td>
                    <td><input type="text" name="types" placeholder="image/png"></td>
                    </tr>
                </table>
                </td>
                </tr>
                <tr>
                <td><input type="submit" value="Submit Entry"> </td>
                </tbody>
            </table>
        </form>

```

`

`

```
<?php 
$file = dirname(__FILE__).'/manifest-test.json';
// file_put_contents($file, json_encode($_REQUEST));

if( !empty( $_POST ) ){

// convert form data to json format
$postArray = array(
    "name" => $_POST['name'],
        "short_name" => $_POST['short_name'],
        "description" => $_POST['description'],
        "orientation" => $_POST['orientation'],
        "start_url" => $_POST['start_url'],
        "display" => $_POST['standalone'],
        "background_color" => $_POST['background_color'],
        "theme_color" => $_POST['theme_color'],
"icons" => array(
  "src" => $_POST["src"],
    "sizes" => $_POST["sizes"],
      "types" => $_POST["types"]
 ),
); //you might need to process any other post fields you have..
$json = json_encode( $postArray );
file_put_contents( $file, $json);
}
    ?>

```

`

```
when i submit details a json is created

```

`

```
{
    "name": "fnvlkjdfsnbkjdfsn",
    "short_name": "jksfvnkjsnvkjsdfn",
    "description": "nfvakjld",
    "orientation": "ksfvkxnvk",
    "start_url": "knsvklj",
    "display": gfndghdf,
    "background_color": "kxsvnkjsdn",
    "theme_color": "skvnsk",
    "icons": {
        "src": "http:\/\/localhost\/wd-wp\/wp-admin\/admin.php?page=test-plugin%2Fmenuform.php",
        "sizes": "192x192",
        "types": "nblkjvzf"
    }
}

```

`

after some time it reload and all value set to null this is my admin panel look like
ps: i;m just getting started in php need you help so badly