# signup

The ->signup() method for the SurrealDB SDK for PHP signs up to a specific access method.

Signs up to a specific authentication access method.

```php title="Method Syntax"
$db->signup([
    "namespace" => "main",
    "database" => "db",
    "access" => "account",
    // ... other variables
]);
```

## Arguments
<table>
    <thead>
        <tr>
            <th colspan="2" scope="col">Arguments</th>
            <th colspan="2" scope="col">Description</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="2" scope="row" data-label="Arguments">
                <code>namespace</code>
                <label label="required" />
            </td>
            <td colspan="2" scope="row" data-label="Description">
                The namespace to sign up to
            </td>
        </tr>
        <tr>
            <td colspan="2" scope="row" data-label="Arguments">
                <code>database</code>
                <label label="required" />
            </td>
            <td colspan="2" scope="row" data-label="Description">
                The database to sign up to
            </td>
        </tr>
        <tr>
            <td colspan="2" scope="row" data-label="Properties">
                <code>access</code>
                <label label="required" />
            </td>
            <td colspan="2" scope="row" data-label="Description">
                The access method to sign up to. Also pass any variables used in the access definition.
            </td>
        </tr>
    </tbody>
</table>

## Example usage
```php
$token = $db->signup([
	"namespace" => "surrealdb",
	"database" => "docs",
	"access" => "user",

	// Also pass any properties required by the access definition
	"email" => "info@surrealdb.com",
	"pass" => "123456",
]);
```

You can invalidate the authentication for the current connection using the [`invalidate()` method](/docs/reference/php/v1/methods/invalidate.md).
