Settings file

The settings file for twzContact is a plain text file that determines what fields should appear on the contact form, where to send email, and other settings specific to your site.

Name and location

By default, the settings file is named twzContact.ini and located in the directory above twzContact.php. You can specify a different name or location in the include text of your web page. However putting it anywhere under your public_html directory is not generally advised, as it would be accessible from any browser, and could be a security risk.


The settings file is organised into sections, and each section is identified by the section name in square brackets, for example:

[General options]

Within a section, each setting is defined by a single line of text:

[General options]
setting1 = value
setting2              =           value
;setting9 = this line is a comment, and will be ignored

The sections contained in the settings file are:

Follow the links above to find out more about each section.

Example settings file

[Email Options]
ToAddress     =
FromAddress   =
Subject       = Message from your web site

[General options]
Submit        = Send request

name          = text,wide,1
email         = text,wide,1
send_brochure = check,,0,0
daytime_phone = phone

[Field Options]
send_brochure = Please send me a brochure,0

[Standard fields]
fFirstName    =
fLastName     =
fName         = name
fEmail        = email
fSubject      = 

[Message Options]
MsgThanks     = Thanks - your message was successfully received.
MsgMissing    = Please check the form - the following fields had a problem:

Editing the settings file

The usual way of editing the settings file is with a text editor (eg Notepad). The file can then be uploaded to your web server by FTP. Alternatively, you can use twzContact itself to edit the file. This can be very convenient and is often much quicker than uploading with an FTP client.

In order to use this functionality, the settings file must have an EditPwd setting (usually in a special [Admin] section, for example

EditPwd = secret

and you must supply the correct password to edit the file, eg

If you're concerned about someone discovering your password from the URL, just make sure on the final edit, you change the EditPwd setting (or remove it completely!). NOTE: On some web servers, you might need to set the correct file permissions to be able to edit the file this way. Check with your hosting provider if you have problems with file permissions.

It's always a good idea to keep a local copy of your current settings file as a backup - just copy the contents, paste into your text editor and save it somewhere on your computer.