> For the complete documentation index, see [llms.txt](https://deskpro.gitbook.io/dev-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deskpro.gitbook.io/dev-guide/getting-started-with-the-api/php/add-a-form.md).

# Add a form

Next, let's add a form to the page and get ready to handle it.

```php
<?php
use Deskpro\API\DeskproClient;
use Deskpro\API\Exception\APIException;

include(__DIR__ . '/vendor/autoload.php');

$client = new DeskproClient('http://deskpro.company.com');
$client->setAuthKey(1, 'dev-admin-code');

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // TODO handle the form
    echo "We will fill this in later.";
    die();
}
?>

<form action="form.php" method="POST">
    Title: <input type="text" name="title"><br>
    <textarea
        name="content"
        placeholder="Article Content"
        cols="80"
        rows="10"
    ></textarea><br>
    <button type="submit">Submit</button>
</form>
```
