# PHP - mysql
{id: php-mysql}

## MySQL - connect
{id: php-mysql-connect}
{i: mysql_connect}
{i: mysql_error}
{i: mysql_select_db}
![](examples/mysql/connect.php)


## Fetch data from MySQL server
{id: php-mysql-query}
{i: mysql_query}
{i: SELECT}
{i: mysql_fetch_assoc}
{i: mysql_close}
![](examples/mysql/list_users.php)


## INSERT data into MySQL
{id: php-mysql-insert}
{i: mysql_query}
{i: INSERT}
![](examples/mysql/register.php)




