Solved

Emailing Contents of An Already Processed Form

Posted on 2003-11-24
7
222 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

20 Experts available now in Live!

Get 1:1 Help Now