Submit To CGI Data (Sendmail)

[Total: 0    Average: 0/5]

This example submits data to a cgi script that sendsmail to the person checked.

Body Code:

<FORM ACTION="http://www.js-examples.com/cgi-local/test/formmail.cgi" METHOD="POST" NAME="email" onSubmit="return false">
<input type=hidden name="subject" value="Shift Change Report">
<input type=hidden name="realname" value="DSL-TAC Shift Change Report">
<input type=hidden name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT"> 
<BR><FONT SIZE="5"><B><CENTER>Email Form</B></FONT><BR><BR></CENTER>
<br><br>
<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=10>
    <TR>
        <TD P ALIGN=RIGHT><B>Your Name <input type="text" name="submitted by" size=20></TD>
        <TD P ALIGN=RIGHT><B>Date <input type="text" name="date submitted" size=10></TD>
        
    </TR>
</TABLE>
<B>Message<BR><TEXTAREA NAME="Message" ROWS="4" COLS="50"></TEXTAREA><BR><BR>
<CENTER>
<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1><caption><B>Check the people you want to send this email to</caption>
    <TR>
<TD ALIGN=RIGHT><INPUT TYPE="checkbox" NAME="recipient1" VALUE="t1@somesite.com">person 1</TD>
<TD ALIGN=RIGHT><INPUT TYPE="checkbox" NAME="recipient2" VALUE="t2@somesite.com">person 2</TD>
<TD ALIGN=RIGHT><INPUT TYPE="checkbox" NAME="recipient3" VALUE="t3@somesite.com">person 3</TD>
<TD ALIGN=RIGHT><INPUT TYPE="checkbox" NAME="recipient4" VALUE="t4@somesite.com">person 4</TD>
<TD ALIGN=RIGHT><INPUT TYPE="checkbox" NAME="recipient5" VALUE="t5@somesite.com">person 5</TD>
 </TR>
</TABLE><BR><BR><BR>
<B><input type="button" value="Submit Email" onClick = "document.email.submit()">
<B><INPUT TYPE="RESET" VALUE="Clear Form"><BR>
</CENTER>
</form>

Times Viewed: 2

Leave a Reply

Your email address will not be published. Required fields are marked *