Skip to content

Forms & PHP

Nexgen ships with a ready-to-use contact form powered by two PHP files in assets/php. A little configuration makes the form deliver mail to your inbox and shrug off spam.

  • Directoryassets
    • Directoryphp
      • form.php sends the email
      • recaptcha.php verifies the visitor

form.php is what actually delivers the message a visitor types into the contact form.

  1. Open assets/php/form.php in your code editor.

  2. Set your recipient address. Find the field for the destination email and replace it with the address where you want messages delivered.

  3. Translate the text (optional). The success and error messages the visitor sees are defined in this file — adjust their wording or translate them to your language as needed.

  4. Save and upload the file to your host, then send yourself a test message to confirm it arrives.

recaptcha.php connects the form to the Google reCAPTCHA API so automated bots can’t flood your inbox. It needs your secret key pasted into the spot the file indicates.

Because reCAPTCHA also requires a site key in your HTML and JavaScript, the full walkthrough lives on its own page:

For the rest of what’s in the package — the file structure and the other asset folders — see The Package and Assets.