Plugin Documentation

Detailed guide to all features, payment gateways, and settings of CP Contact Form with PayPal.

How It Works

From the WordPress administrator perspective, setting up a form takes three steps:

  1. Add and arrange your form fields in the visual Form Builder.
  2. Configure the form processing, email notifications, and PayPal/payment gateway settings.
  3. Publish the form on any page or post using the Gutenberg Block, Elementor widget, Publish Wizard, or shortcode.

From the visitor (end user) perspective, the workflow is as follows:

  1. The user fills in the form fields.
  2. If PayPal / payment integration is disabled:
    1. The user clicks "Submit" and the website administrator receives a notification email with the submitted data.
    2. The user receives an automated confirmation ("thank you") email.
    3. The user is redirected to your designated "Thank You" page.
  3. If PayPal / payment integration is enabled:
    1. The user clicks "Submit" and is redirected to PayPal (or completes on-site payment).
    2. In the background: The submission is saved in your WordPress database and marked as "Not Paid".
    3. The user completes the payment at PayPal.
    4. In the background: PayPal sends an Instant Payment Notification (IPN) to your site. The plugin verifies the payment, marks the submission as "Paid", and sends the notification email to the administrator.
    5. The user receives an automated confirmation email.
    6. The user is redirected to the "Thank You" page on your WordPress website.

Installation

To install the plugin in WordPress, follow these steps:

  1. Download the plugin .zip file to your computer.
  2. Log in to your WordPress administration dashboard and go to Plugins.
  3. If you have an older or free version of the plugin installed, deactivate and delete it first (your existing forms and submissions are safely preserved in the database).
  4. Click the "Add New" button at the top of the Plugins screen.
  5. Click "Upload Plugin" and select the .zip file downloaded in step 1.
  6. Click "Install Now" and then "Activate Plugin".

Inserting a Form on a Page

  1. Configure your form under CP Contact Form with PayPal in the WordPress admin menu.
  2. You can embed the form using the CP Contact Form with PayPal block in the Gutenberg Block Editor, the Elementor Widget, the Publish Wizard button, or the classic editor icon:

    Insert Form

  3. Alternatively, paste the shortcode [CP_CONTACT_FORM_PAYPAL id="1"] directly into any page or post. When viewed on the public website, the shortcode renders your live payment form:

    Rendered Form

Managing Forms

Navigate to CP Contact Form with PayPal in your WordPress admin menu to view your list of forms:

Forms List

For each form in the list, you have the following options:

  • ID: Unique identification number of the form, used in shortcodes.
  • Form Name: Internal name used to identify the form in the admin area.
  • Rename / Update: Saves changes to the form's name.
  • Settings: Opens the visual Form Builder and configuration tabs for the form.
  • Publish: Opens the 1-click Publish Wizard to embed the form in a new or existing page/post.
  • Messages: Opens the searchable, printable list of submissions (both paid and unpaid) for that form.
  • Clone: Creates an exact duplicate of the form and its settings.
  • Delete: Deletes the form and its settings.
  • Shortcode: One-click copyable shortcode for embedding the form on any page or post.
Checking Submissions

Messages Screen

Click the "Messages" button next to any form to view its submissions. The Messages screen includes a filter bar to search submissions by keyword, date range, or form.

From the Messages screen you can manually toggle a submission's status between Paid and Not Paid, process PayPal refunds, edit or add entries (in the Platinum version), print the list, delete individual or bulk entries, and export submissions to a CSV file.

Exporting Submissions to a CSV File

Exporting Submissions

To export submissions to a spreadsheet, open the Messages screen, optionally filter by date or keyword, and click "Export to CSV". The first row of the CSV file contains column headers using each field's "Short label" (or the standard "Field Label" if no short label is set).

The Form Builder

The visual Form Builder lets you add, rearrange, edit, and remove fields, as well as configure validation rules and conditional dependencies.

Form Builder

Form Title and Predefined Designs

The "Form Settings" tab in the builder lets you set the form's header title, description, label alignment (top-aligned, left-aligned, or right-aligned), and visual template.

Form Settings Tab

Available Field Types (*):
  • Single Line Text: Standard single-line text input.
  • Number: Validates numeric or digits-only input with optional min/max limits.
  • Slider: Interactive slider handle for selecting numeric values.
  • Currency: Formatted currency input supporting custom symbols, decimals, and thousand separators.
  • Hidden: Hidden input field for passing fixed or dynamic metadata.
  • Email: Validates that the entered value is a properly formatted email address.
  • Date/Time: Interactive calendar date-picker (with optional month/year dropdowns, min/max dates, and time selection).
  • Checkboxes: Allows selecting one or more options, with optional price calculation per choice.
  • Radio Buttons (Multiple Choice): Allows selecting one option from a list, with optional price calculation.
  • Dropdown: Select menu supporting dynamic pricing and conditional dependencies.
  • Upload File: Allows visitors to upload documents or images with their submission.
  • Password: Masked password input (supports "Equal To" confirmation matching).
  • Phone Field: Segmented phone input with configurable format masks (e.g., ### ### ####).
  • Instruct. Text / Comment Area: Displays instructional text or section notes inside the form.
  • Accept / GDPR: Required consent checkbox with a link or popup dialog for terms/privacy policies.
  • Summary: Displays a live summary of the values entered by the user before submission.
  • Section Break: Visual divider line with an optional title and description to group sections.
  • Page Break: Splits the form into multiple pages with "Next" and "Previous" buttons.
  • HTML Content: Allows embedding custom HTML code or scripts directly inside the form.
  • Media: Embeds images, audio, or video files inside the form.
  • Button: Custom button control for triggering custom JavaScript actions.
* Note: The Free version includes the essential contact fields (Single Line Text, Email, Text Area, and Accept / GDPR). All 20+ advanced field types are included in the Platinum version.
Container Fields

Container controls allow you to group multiple fields together or arrange them in multi-column rows:

  • Fieldset Container: Wraps grouped fields inside a bordered fieldset with a title legend.
  • Div Container: Groups related fields cleanly into multi-column layouts without adding visible borders.
DataSource Fields (Platinum Version)

The Platinum version includes dynamic DataSource (DS) controls that automatically populate their values or choices from external sources:

  • Line Text DS: Text input populated from a Database query, WordPress Posts, Taxonomies, or User data.
  • Number DS: Numeric input populated from a Database query, Posts, Taxonomies, or User data.
  • Email DS: Email field populated from a Database query or logged-in WordPress User data.
  • Text Area DS: Text area populated from a Database query or Post content.
  • Checkboxes DS: Checkbox group dynamically populated from a Database, CSV file, Posts, Taxonomies, or Users.
  • Radio Btns DS: Radio button group dynamically populated from a Database, CSV file, Posts, Taxonomies, or Users.
  • Drop-down DS: Dropdown menu dynamically populated from a Database, CSV file, Posts, Taxonomies, or Users.
  • Hidden DS: Hidden input populated from a Database, Posts, Taxonomies, or Users.
Editing Field Settings in the Form Builder

Field Settings

Click any field in the form preview on the right to edit its properties in the "Field Settings" tab:

  • Field Label: The label displayed on the public form and in notification emails.
  • Short label (optional): Column header name used when exporting submissions to CSV.
  • Field tag for the message: The specific tag (e.g., <%fieldname1%>) you can copy into notification emails or the thank-you page.
  • Field Size & Layout: Controls field width (Small, Medium, Large) and choice arrangement (One Column, Two Columns, Three Columns, Side by Side).
  • Validation Rules: Set whether the field is Required, or specify min/max character lengths or numeric bounds.
  • Predefined Value: Default value or placeholder text shown inside the field.
  • Instructions for User: Helpful hint text displayed below the field (or as a floating tooltip).
  • Add CSS Layout Keywords: Add custom CSS class names (e.g., column2, column3) to style or align specific fields.
  • Equal To Validation: Ensures two fields match (e.g., "Confirm Email" or "Confirm Password").
Configuring DataSource Controls (Platinum Version)
  1. Add a DataSource control (ending in DS) to your form and click it to open its settings.
  2. Locate the "Define Datasource" section and choose the source type:
    • Database: Populates the field using a local WordPress or external MySQL database query.
    • CSV: Populates multi-choice fields (Drop-down DS, Checkboxes DS, Radio Btns DS) from a CSV file.
    • Post Type: Populates the field from WordPress posts, pages, or custom post types (e.g., WooCommerce products).
    • Taxonomy: Populates the field from categories, tags, or custom taxonomies.
    • User Data: Populates the field from WordPress user accounts (such as the currently logged-in user).

Example — Connecting to a Database Table:

  1. Select Database from the datasource list.
  2. If connecting to an external database, enter the Host, Username, Password, and Database Name, then click Test Connection. (Leave these blank to use the local WordPress database.)
  3. Specify the column name for Values, the column name for Texts (labels), the Table Name, and optional Condition (WHERE), Order By, and Limit clauses.

For advanced queries, select "Custom Query" and use AS value and AS text aliases:

SELECT column1 AS value, column2 AS text FROM tablename WHERE column3 > 5 ORDER BY column2 ASC LIMIT 5

You can also filter queries dynamically using values from other form fields with the <%fieldname#%> syntax inside the WHERE condition (for example: ID=<%fieldname3%>).

Example — Using a CSV File as a DataSource:

  • Select CSV file: Choose or provide the URL to your CSV file.
  • Use headline: Check this if the first row of the CSV contains column headers.
  • Delimiter: Specify the separator character (comma, semicolon, or tab).
  • Click "Import CSV" to load the columns, then select which column provides the choice Texts and which provides the Values.
Creating Conditional Dependencies Between Fields

Radio buttons, checkboxes, and dropdown menus can dynamically show or hide other fields based on the visitor's selection:

  1. Click the radio button, checkbox, or dropdown field in the form preview.
  2. In the Choices section of the Field Settings tab, click the "Show Dependencies" link.
  3. Next to each choice, select the field that should be displayed when that choice is selected (click the + icon to attach multiple dependent fields to the same choice).

Form Settings Area

Validation Settings

Validation Settings

Customize or translate the validation messages shown to visitors when a field is incomplete or invalid:

  • "is required" text: Shown when a required field is left blank.
  • "is email" text: Shown when an email field does not contain a valid email address.
  • "is valid date (mm/dd/yyyy)" / "(dd/mm/yyyy)" text: Shown when a date does not match the expected format.
  • "is number" / "only digits" text: Shown when non-numeric characters are entered into numeric fields.
  • "under maximum" / "over minimum" text: Shown when a value falls outside the allowed range.
PayPal Payment Configuration

PayPal Payment Configuration

  • Enable PayPal Payments: Choose whether PayPal is required, optional (letting users choose between PayPal and "Pay Later"), disabled (standard contact form), or connected via PayPal Pro, Express, or REST API.
  • When should the notification-confirmation emails be sent?: Choose whether emails are sent after payment is confirmed by PayPal (default) or immediately before payment.
  • PayPal Mode: Choose Production for live payments or SandBox for testing with a PayPal developer sandbox account.
  • PayPal Email: The merchant email address associated with your PayPal business account.
  • Request Cost: The base payment amount charged for the form.
  • Automatically identify prices on dropdown and checkboxes?: When enabled, any price written inside a selected dropdown, radio button, or checkbox option (e.g., $30, $24.99, or $1,499.99) is automatically added to the base request cost.
  • Use a specific field from the form for the payment amount: Adds the numeric value entered into a selected form field to the base request cost (ideal for open donation amounts or calculated fields).
  • Currency: Any PayPal-supported currency code (e.g., USD, EUR, GBP, CAD, AUD).
  • Taxes (percent): Optional tax percentage applied to the total at checkout.
  • Request address at PayPal: Choose whether PayPal should prompt the buyer for a shipping address.
  • A $0 amount to pay means: Choose "Don't require any payment (skip PayPal)" (ideal for 100% discount coupons or free tiers) or "Let the user enter any amount at PayPal" (for open donations).
  • PayPal Product Name: The item name shown on the PayPal checkout screen. Supports field tags such as <%fieldname3%>.
  • PayPal Language: Two-letter language code for the PayPal checkout interface (e.g., EN, ES, FR, DE).
  • Payment Frequency: Choose a one-time payment or recurring subscription billing (weekly, monthly, every 3/6/12 months, or dynamically taken from a form field), including optional setup/trial period fees.
  • Discount Codes: Create percentage or fixed-amount coupon codes with usage limits and expiration dates.
PayPal Pro Integration (Platinum Version)

PayPal Pro Settings

With the PayPal Pro integration included in the Platinum version, visitors can enter their credit card details directly on your website without being redirected to an external payment page.

To use PayPal Pro, you need a PayPal Payments Pro merchant account and an SSL (HTTPS) certificate on your website to ensure cardholder data is transmitted securely.

  • Enable PayPal: Select "Yes - PayPal Pro" (or one of the optional PayPal Pro + PayPal Standard modes).
  • PayPal Pro - API UserName: Your NVP API Username from your PayPal merchant account.
  • PayPal Pro - API Password: Your NVP API Password.
  • PayPal Pro - API Signature: Your NVP API Signature.
  • Store payment info?: Defaults to "No (recommended)". If set to "Yes", billing details and a masked card number (XXXX-XXXX-XXXX-1234) are saved with the submission and can be referenced in emails using tags such as <%ppro_firstname%>, <%ppro_cctype%>, and <%ppro_ccnumber%>.
Form Processing / Admin Email Settings

Email Settings

  • "From" email: The sender email address used for outgoing notifications. Important: Always use an email address belonging to your website's domain (e.g., info@yourdomain.com) so mail providers (Gmail, Outlook, Yahoo) do not flag notifications as spam.
  • Destination emails (comma separated): One or more administrator email addresses that will receive submission notifications.
  • Email subject: Subject line of the admin notification email.
  • Include additional information?: Appends the visitor's IP address, browser info, and server timestamp to the admin email.
  • Thank you page: The URL where users are redirected after completing their submission or payment.
  • Error / Cancel page: Optional URL where users are sent if they cancel payment (leave blank to return to the form page).
  • Email format?: Choose between Plain Text and HTML.
  • Message: The body of the admin email. Include <%INFO%> to output all submitted non-empty fields.
Email Copy to User (Auto-Responder)

Email Copy to User

  • Send confirmation/thank you message to user?: Enables or disables the automatic confirmation email sent to the visitor.
  • Email field on the form: Select which email field in your form contains the visitor's email address.
  • Email subject: Subject line of the confirmation email sent to the user.
  • Email format?: Choose between Plain Text and HTML.
  • Message: The body of the user confirmation email (supports <%INFO%> and individual field tags).
Captcha Settings

Captcha Settings

  • Use Captcha Verification?: Enables or disables the built-in anti-spam security image.
  • Width / Height / Chars: Customize the dimensions and number of characters in the captcha image.
  • Min / Max font size: Range for randomized character sizing.
  • Noise & Noise Length: Adjusts the background security lines/dots.
  • Background / Border / Font: Customize the colors and font family with a live preview.

Tags Allowed in Notification Emails & Thank You Pages

You can personalize your notification emails, confirmation emails, and thank-you pages using the following dynamic tags:

  • <%INFO%> — Replaced with all field labels and values submitted in the form.
  • <%fieldname#%> — Replaced with the value of a specific field (e.g., <%fieldname1%>, <%fieldname3%>).
  • <%itemnumber%> — The unique submission ID number (also used as the PayPal order reference).
  • <%Cost%> — The calculated price sent to PayPal (after discounts).
  • <%Costtax%> — The total amount including tax.
  • <%coupon%> — The discount/coupon code applied to the submission (if any).
  • <%payment_type%> — The selected payment method (e.g., PayPal or Other when PayPal is optional).
  • <%user_login%>, <%user_id%>, <%user_email%>, <%user_firstname%>, <%user_lastname%>, <%display_name%> — Details of the logged-in WordPress user who submitted the form (if logged in).

Payment Gateways Integration

In addition to built-in PayPal support, the Platinum version includes add-ons for connecting your forms to multiple payment gateways. A single form can even offer multiple payment gateways simultaneously—displaying a radio button selector so customers can choose their preferred payment method at checkout.

PayPal Standard Payments

PayPal Standard is built directly into the plugin core. See the PayPal Payment Configuration section above for setup details.

PayPal Pro Add-On

PayPal Pro Add-On

Allows customers to pay by credit card directly on your website without leaving your page. See the PayPal Pro Integration section above for API configuration details.

Authorize.Net Server Integration Method (SIM) Add-On

Authorize.Net

The Authorize.Net SIM add-on connects your forms to Authorize.Net's hosted payment form, handling card collection, settlement, and PCI compliance securely.

Activate Authorize.Net Add-On

To enable it, go to CP Contact Form with PayPal >> Add-Ons Manager, check "Authorize.net Server Integration Method", and click Activate / Deactivate Add-Ons.

Authorize.Net Settings

  • Enable Authorize.net SIM?: Select "Yes" to enable Authorize.Net for the form.
  • Mode: Choose "test" for sandbox testing or "production" for live transactions.
  • API Username (Login ID) & API Key (Transaction Key): Enter the credentials from your Authorize.Net merchant account.
  • Receipt URL: The URL where users return after a successful payment. Important: You must also configure this Receipt Link URL inside your Authorize.Net Merchant Interface.
  • Cancel URL: The URL where users return if payment is canceled or fails.

Stripe Payments Add-On

Stripe

The Stripe Payments add-on lets you accept major credit/debit cards directly on your website using Stripe. An SSL (HTTPS) certificate is required on your website for live transactions.

To enable it, activate "Stripe" in the Add-Ons Manager, then configure the following in your form settings:

Stripe Settings

  • Enable Stripe?: Select "Yes" to enable Stripe on the form.
  • Stripe.com Publishable Key & Secret Key: Found in your Stripe Dashboard API Keys page.
  • Payment frequency: Select one-time payments or recurring subscriptions (with optional trial days and plan name).

Skrill Payments Add-On

Skrill

The Skrill Payments add-on connects your forms to Skrill's hosted checkout supporting cards, digital wallets, and local bank transfers (skrill.com).

Skrill Settings

  • Enable Skrill Payments?: Select "Yes" to enable Skrill on the form.
  • Skrill Email: The email address linked to your Skrill merchant account.
  • Receipt URL & Cancel URL: Return pages after successful or canceled payment.
  • Currency: Three-letter currency code (e.g., USD, EUR, GBP).

TargetPay (iDEAL) Add-On

TargetPay iDEAL

Provides Dutch iDEAL online banking integration via TargetPay. Activate "iDeal TargetPay" in the Add-Ons Manager and configure your RTLO Subaccount ID, failure return URL, and mode (test or production) in the form settings.

TargetPay Settings

Mollie (iDEAL) Add-On

Mollie iDEAL

Provides iDEAL payment integration via Mollie. Activate "iDeal Mollie" in the Add-Ons Manager, then enter your Mollie API Key (test or live) and failure return page in the form settings.

Mollie Settings

RedSys / Servired / Sermepa TPV Add-On

RedSys TPV

Provides virtual POS (TPV) credit card integration for Spanish banks (Santander, BBVA, CaixaBank, Sabadell, Bankinter, etc.) via RedSys.

RedSys Settings

  • Enable TPV: Select "Yes" to enable RedSys on the form.
  • CÓDIGO COMERCIO: Merchant code provided by your bank / RedSys.
  • CLAVE SECRETA: Secret encryption key provided by RedSys.
  • Mode: Select "Sandbox" for testing or "Production" for live payments.

SagePay Add-On

SagePay

Integrates your forms with the SagePay (Opayo) payment gateway. Activate "SagePay Payment Gateway" in the Add-Ons Manager, then configure your Vendor ID, SagePay Encrypt Password, and mode (Sandbox or Production) inside the form settings.

SagePay Settings

SagePayments Add-On

SagePayments

Connects your forms to Sage Payment Solutions (Shopping ExpressPay). Activate "SagePayments Payment Gateway" in the Add-Ons Manager, then configure your Merchant ID (M_id) and optional billing field mappings in the form settings.

SagePayments Settings

Workflow, CRM & Security Add-Ons

All add-ons included in the Platinum version can be enabled with one click in the Add-Ons Manager on the main plugin page:

Add-Ons Manager

iCal Export Attached Add-On

Automatically generates and attaches an iCal (.ics) calendar invite to confirmation emails so users can import the event into Google Calendar, Apple Calendar, or Outlook.

iCal Export Settings

  • ID of the field that contains the date: The field ID of a Date field on your form (e.g., fieldname1).
  • iCal entry summary & description: Customize the calendar event title and description using form field tags.
  • Timezone & Daylight Saving settings: Adjust server time offsets if needed.

Signature Add-On

Signature Add-On

Converts selected form fields into interactive signature pads where visitors can sign using a mouse, stylus, or touchscreen.

Signature Settings

  • Color & Line thickness: Customize the ink color (e.g., #000000) and stroke width.
  • Show guideline & Guideline color: Toggle and style the horizontal signing baseline.

MailChimp Add-On

MailChimp

Automatically adds form submitters as subscribers to your MailChimp audience lists.

MailChimp Settings

  1. Enter your MailChimp API Key in the form settings.
  2. Click "Get Lists" to fetch your MailChimp audiences.
  3. Select an audience list and click "Get Fields and Groups" to map your form fields to MailChimp merge fields and interest groups.

Twilio SMS Add-On

Twilio

Sends automated SMS text notifications to administrators and/or customers via Twilio when a form is submitted or paid.

Twilio Settings

  • Account SID & Authentication Token: Provided in your Twilio console.
  • From Phone Number: Your Twilio sender phone number (including country code).
  • To Phone Number / To Phone fields: Comma-separated admin phone numbers or form field IDs (e.g., fieldname2) to text the customer.
  • Message: SMS text content (supports all email notification tags).

Clickatell SMS Add-On

Clickatell

Sends automated SMS notifications to administrators and customers via Clickatell.

Clickatell Settings

  • Account API Key: Your Clickatell API Key.
  • To Phone Number / To Phone fields: Destination phone numbers or form field IDs (e.g., fieldname2).
  • Message: SMS text content (supports all email notification tags).

WooCommerce Add-On

Integrates custom forms with WooCommerce products so product prices can be dynamically calculated from user selections and added directly to the WooCommerce cart.

  • Enter the ID of the form: Links a specific form to the WooCommerce product.
  • Calculate the product price through the form: Overrides or adds to the product price using the form's calculated cost.
  • Minimum price allowed: Enforces a floor price for the product.
  • Activate the summary: Displays the submitted form fields inside the WooCommerce cart and order details.

WooCommerce Add-On

SalesForce Add-On

Automatically creates new leads in your SalesForce CRM account using Web-to-Lead.

  • Enter the OID (Organization ID): Your SalesForce Organization ID.
  • Enabling debug: Optional debug mode to send lead creation logs to your email.
  • Add attribute: Map SalesForce standard or custom lead attributes to your form fields (fieldname#).

SalesForce Add-On

WebHook & Zapier Add-On

Posts submitted form data in real time to one or more WebHook URLs, enabling seamless integration with Zapier, Make, Zoho CRM, Dropbox, Google Drive, and hundreds of external web apps.

Tip for Zapier: Choose Webhooks by Zapier as the Trigger app and select "Catch Hook", then paste the generated webhook URL into the WebHook section of your form settings.

WebHook Add-On

Google reCAPTCHA Add-On

Protects your forms from automated spam using Google reCAPTCHA instead of the traditional image captcha. Activate the reCAPTCHA add-on and enter your Google reCAPTCHA Site Key and Secret Key.

reCAPTCHA Add-On

Post Creation Add-On

Automatically creates and publishes a WordPress post after a form is submitted (or paid) using the submitted field values for the post title, content, category, tags, and featured image.

Post Creation Add-On

IP to Country Add-On

Identifies the visitor's country from their IP address, pre-selects the corresponding PayPal locale/country where applicable, and provides three additional email tags:

<%ip%>
<%countrycode%>
<%countryname%>

Troubleshoot Area & General Settings

Troubleshoot Area

Located below the main forms list, the Troubleshoot Area helps resolve script caching conflicts or character encoding issues:

  • Script load method: Switch from Classic to Direct if a third-party caching/optimization plugin prevents the form from rendering on the frontend.
  • Character encoding: Updates the database table collation if special or non-Latin characters are not displaying properly.

Tips & Tricks

Storing Data in a Different Database (Platinum Version)

The Platinum version allows you to insert submitted form data into an external MySQL database or custom table by editing the cp_contactformpp_insert_in_database.php file located in the plugin directory.

First, define your database connection constants at the top of cp_contactformpp_insert_in_database.php:

define( 'DATABASE_HOST', '' );
define( 'DATABASE_USER', '' );
define( 'DATABASE_PASS', '' );
define( 'DATABASE_NAME', '' );
define( 'DATABASE_TABLE', '' );

Next, map your form fields (e.g., fieldname1, fieldname2, fieldname3) from the $params array and customize the INSERT INTO SQL query to match your table's column names:

$field1 = mysqli_escape_string( $db_link, $params['fieldname1'] );
$field2 = mysqli_escape_string( $db_link, $params['fieldname2'] );
$field3 = mysqli_escape_string( $db_link, $params['fieldname3'] );

mysqli_query( $db_link, "INSERT INTO `" . DATABASE_TABLE . "` (firstname, lastname, email) VALUES ('$field1', '$field2', '$field3');" );