Two non-CGI form mailers are included in Linux shared hosting account default files: webformmailer.php and gdform.php. They reside in the root directory of your hosting account. Incorporating either of these scripts into your website creates a form to capture user information and email it to a specified address.
For more information about designating the destination email address, see Specifying an Email Address for the PHP Form-Mailer.
Follow these steps to use webformmailer.php.
<form action="/webformmailer.php" method="post"> <input type="hidden" name="subject" value="Submission" /> <input type="hidden" name="redirect" value="thankyou.html" /> First Name: <input type="text" name="FirstName" /> Last Name :<input type="text" name="LastName" /> Email: <input type="text" name="email" /> Comments: <textarea name="comments" cols="40" rows="10"> Type comments here.</textarea> <input type="submit" name="submit" value="submit"/> <input type="hidden" name="form_order" value="alpha"/> <input type="hidden" name="form_delivery" value="hourly_digest"/> <input type="hidden" name="form_format" value="html"/> </form>
/webformmailer.php
to the action attribute and set the form method to post
:<form action="/webformmailer.php" method="post">
form_format determines in what format the information is delivered. Its values are 'text', 'csv', 'html', 'xml', and 'default' (same as 'text').
form_delivery determines the frequency and packaging of delivery. All form submissions are sent via an attachment. You can specify the form_delivery variables as one of the following: 'digest', 'hourly_digest', and 'daily_digest'.
Follow these steps to use gdform.php.
WARNING: The gdform.php
file cannot be recovered if it's deleted.
<form action="/gdform.php" method="post"> <input type="hidden" name="subject" value="Form Submission" /> <input type="hidden" name="redirect" value="thankyou.html" /> <p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p> <p>E-Mail:<input type="text" name="email" /></p> <p>Comments:<textarea name="comments" cols="40" rows="10"> Type comments here. <input type="submit" name="submit" value="submit"/> </form>
Keep in mind that our form-mailer script will sort the names of your form items alphabetically when it composes the email message. This is the order of precedence: uppercase letters, lowercase letters, numbers.
/gdform.php
. For example:
<form action="/gdform.php" method="post">
For more information on customizing HTML Forms, go to W3 Schools HTML Forms and Input.
For information on reinstalling your default scripts, see How Do I Reinstall the Default Scripts Directory?