Solved

Emailing Contents of An Already Processed Form

Posted on 2003-11-24
7
205 Views
Last Modified: 2013-12-24
I've developed a webpage that displays the contents of my database. The user has 4 different views to look at, (View 1, View 2, View 3 and View All). In each of these views the user can select some rows, add the rows to a cart and continue browsing.

I know how to get what the user selected , but i don't know how to get what they selected, store their selection, allow them to continue surfing, store more rows, and then finally email the administrator their selections.

This is what i don't know how to do:

1. I do not know how to allow users to Sort Columns by clicking a Column Header.

2. I do not know how to allow user to select rows (via checkbox) and send the selections to a cart (structure i am assuming), continue browsing and add more items to cart.

3. I do not know how to have all the pages display how many items they have the the cart.

4. I do not know how to have user view cart and delete selections.

5. I do not know how to have user email their selections over to an email address that is stored in the same database (different table).

6. I do not know how to send html email to administrator.
0
Comment
Question by:zakirdavis
  • 5
7 Comments
 
LVL 10

Expert Comment

by:Mause
ID: 9816326
You can just use cfmail and type=HTML

<cfmail to="#Email#" from="me@this.com" subject="message from me" type="HTML">
<Table>
  <TR BGCOLOR="#bgcolor#">
        <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column1 IS "">
              <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
              #column1#
            </CFIF>
            </FONT></DIV>
       </TD>
  </tr>
</TABLE>
</cfmail>

But make sure you also submit the sellection in a hiiden field or something

Mause
0
 
LVL 11

Accepted Solution

by:
hart earned 125 total points
ID: 9816342
ok thats simple, pass the #FORM.PROPID# from Results.cfm in an hidden field to sendmail.cfm

on that page now u can do the following

----------send mail page
<CFQUERY name="invest" datasource="Investment">
SELECT ID, column1, column2, column3, column4, column5, column6, column7, column8, column9,
column10, column11, column12
FROM Land
WHERE ID IN (#FORM.PROPID#)
ORDER BY column1 ASC
</CFQUERY>

<CFMAIL FROM="Your Name<system@am.com>" TO="#Trim(form.FName)# #Trim(form.LName)#<#Trim(Lcase(form.Email))#>" TYPE="HTML" SUBJECT="what ever u want to write">

    <!--- Include page header --->
<CFINCLUDE TEMPLATE="header.cfm">

<!--- Create HTML Page & Display List --->
<TABLE WIDTH="99%" BORDER="1" ALIGN="CENTER" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#CCCCCC">
 <TR>
    <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Area</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Type</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Zoned</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Dimension</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Price</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Acres</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Per
        Acre</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Features</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Taxes</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Infra</STRONG></FONT></DIV></TD>
   <TD BORDERCOLOR="#CCCCCC"><DIV ALIGN="CENTER"><FONT SIZE="-1"><STRONG>Survey</STRONG></FONT></DIV></TD>
 </TR>
 <TR>
 <TD COLSPAN="11"><BR><CENTER><FONT COLOR="#0000FF"><B><UL>Below Are Your Selections</UL><P></B></FONT></CENTER></TD></TR>

   <cfloop query="invest">
      <!--- What Color Should Row Be? --->
     <CFIF CurrentRow MOD 2 IS 1>
       <CFSET bgcolor="##cccccc">
       <CFELSE>
       <CFSET bgcolor="white">
     </CFIF>
     <TR BGCOLOR="#bgcolor#">
        <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column1 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column1#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column2 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column2#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column3 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column3#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column4 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column4#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="RIGHT"><FONT  SIZE="-1">
            <CFIF column5 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #NumberFormat(column5, "$,")#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column6 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column6#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="RIGHT"><FONT  SIZE="-1">
            <CFIF column7 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #NumberFormat(column7,"$,.__")#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF Features IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column8#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column9 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             <DIV ALIGN="RIGHT">#NumberFormat(column9,"$,.__")#</DIV>
           </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column10 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column10#
            </CFIF>
           </FONT></DIV></TD>
       <TD><DIV ALIGN="CENTER"><FONT  SIZE="-1">
            <CFIF column11 IS "">
             <B><FONT color=red>n/a</FONT></B>
              <CFELSE>
             #column11#
            </CFIF>
           </FONT></DIV></TD>
     </TR>
   </cfloop>
  </table>
</cfmail>


Regards
Hart
0
 
LVL 11

Expert Comment

by:hart
ID: 9816347
oh i am late :-)

Regards
Hart
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 11

Expert Comment

by:hart
ID: 9816348
oh i am late :-)

Regards
Hart
0
 
LVL 11

Expert Comment

by:hart
ID: 9822445
Thnx :-)
0
 

Author Comment

by:zakirdavis
ID: 9822755
Thank you. it helped quite a bit. Can you check out my new question?
0
 
LVL 11

Expert Comment

by:hart
ID: 9855863
sorry i coudn't reply earlier, i was out of station...

see u have the #FORM.PROPID# defined in your page [before sending the mail]
<TR>
    <TD COLSPAN="2"><DIV ALIGN="CENTER">
        <P>&nbsp;</P><TABLE WIDTH="35%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
          <TR VALIGN="BOTTOM">
            <TD WIDTH="50%"> <DIV ALIGN="CENTER">
                <INPUT NAME="Send" TYPE="submit" ID="Send" VALUE="Send">
              </DIV></TD>
            <TD WIDTH="50%"> <DIV ALIGN="CENTER">
                <INPUT TYPE="RESET" NAME="Submit2" VALUE="Reset">
              </DIV></TD>
          </TR>
        </TABLE>
      </DIV></TD>
  </TR>
</TABLE>
        </DIV>
        <input type="hidden" name="PROPID" value="<cfoutput>#FORM.PROPID#</cfoutput>"> <!--- note this line of code --->
       </TD>
    </TR>
  </CFFORM>
</TABLE>

This is how us pass the propid in an hidden field to send mail page

Regards
Hart
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now