You may execute any database query after each form submission to save user input to your database.
- MySQL
- PostgreSQL
- MS SQL
- SQLite
- ODBC
- Oracle
MySQL
Use a “mysql_query” action to save data to a MySQL database. This action works with INSERT and UPDATE queries. If you want to get data from a MySQL database, please use the "Database Select action". If you want to select and update several entries of your MySQL database at one time, please read the section "MySQL selection and update of several entries".
Syntax:
“query” may be any valid MySQL query.
Example:
The variables {#name#} and {#email#} will be changed to the user submitted data on the “name” and “email” fields.
Optional parameter varible_name allows to specify name of variable (field name) where id of inserted row will be placed after query executes. You can then show this id on thank you page or send in email. Also you can use it to build url for direct access to this record or any other usage.
To show contents of this variable use {#varible_name#}
To set MySQL hostname, username, and password use the following settings in your config.php file:
These settings are common for for all forms and must be set in the first section of config.php (global section) before the individual form configuration blocks.
PostgreSQL
PostgreSQL query executor.
Syntax:
<query> is any valid PostgreSQL query.
Example:
Additional settings:
MS SQL
Microsoft SQL query executor.
Syntax:
Where <query> is any valid Microsoft SQL query.
Example:
Additional settings:
SQLite
SQLite query executor.
Syntax:
Where <query> is any valid SQLite query.
Example:
Additional settings:
ODBC
ODBC SQL query executor.
Syntax:
Where <query> is any valid SQL query.
Example:
Additional settings:
Oracle
Queries to an Oracle database.
First, setup database connection details:
Then you can use oracle_query action to run queries.
Example:
Database storage support is only available with the following licenses: Business, World Wide, ISP.