Processing Forms to EmailIntroductionForms allow your web site visitors to interact with you. To receive the visitor's information, use the mgiSendMail tag to translate the form submission into a formatted email. In this example, a store is collecting comments about their products. MGI TagsSteps
Step 1: Create an information request form.
<form action="infoprocess.mgi" method="post"> <h2>Information Request Form</h2> <P><CENTER> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3"> <TR><TD ALIGN="RIGHT">Name</TD> <TD><INPUT NAME="Name" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Company</TD> <TD><INPUT NAME="Company" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Address</TD> <TD><INPUT NAME="Address" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">City</TD> <TD><INPUT NAME="City" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">State</TD> <TD><INPUT NAME="State" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Zip</TD> <TD><INPUT NAME="Zip" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Country</TD> <TD><INPUT NAME="Country" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Phone Number</TD> <TD><INPUT NAME="Phone" TYPE="text" SIZE="40"></TD> </TR> <TR><TD ALIGN="RIGHT">Email Address</TD> <TD><INPUT NAME="Email" TYPE="text" SIZE="40"></TD> </TR></TABLE> </CENTER></P> <P><CENTER> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3"> <TR><TD><CENTER><P>Please describe any specific comments or questions in the box below.</P> <P><TEXTAREA NAME="Comments" ROWS="7" COLS="50"> </TEXTAREA></P> <P><INPUT TYPE="submit" VALUE="Submit Request"> </P></CENTER> </TD></TR> </TABLE> </CENTER></P> </form> Step 2: Create a form processing page and open it in a text editor.
Step 3: Insert the mgiSendMail tag.
<h2><center>Information Request Submission </center></h2> <p><center>Thank you for your request. A representative will contact you shortly. </center></p> <mgiSendMail to="info@domain.com" from="webmaster@domain.com" mailserver="mail.domain.com" subject="Info Request"> Information Request ******************* Name: <mgiPostArgument name="name"> Company: <mgiPostArgument name="company"> Address: <mgiPostArgument name="address"> City: <mgiPostArgument name="city"> State: <mgiPostArgument name="state"> Zip: <mgiPostArgument name="zip"> Country: <mgiPostArgument name="country"> Phone: <mgiPostArgument name="phone"> Email: <mgiPostArgument name="email"> Comments: <mgiPostArgument name="comments"> </mgiSendMail> Step 4: Save the form processing page.
Step 5: FTP the information request form and form processing page to the web server running MGI.
Step 6: View the information request form in a web browser and submit the request.
Information Request ******************* Name: Allan Para Company: Para, Inc. Address: 1234 Main Ave. City: Denver State: CO Zip: 33489 Country: US Phone: 848-293-4712 Email: allan@parainc.com Comments: I am interested in your product, but does it come in different sizes? |