DOCUMENTATION

  • Developer
Search »

Submission Pre-Parser

You may find you need to make database queries within your pre-parser rules. This page contains a little code to nudge you onto the right path. The code will depend on your exact use-case, but syntactically this will give you an idea of what to include to run database queries.


Form Tools 2

Form Tools 2 uses the old mysql_* methods that were standard in PHP for many years. You can include this code in your rules to perform database queries. The mysql_* methods are very simple to use, as illustrated:


Form Tools 3

Form Tools 3 uses PDO for all database interaction. It provides a wrapper via the Database class (found at global/code/Database.class.php). Give that a good read for the various options available, but here are a few simple examples of how to use the class: