Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Emailing Contents of An Already Processed Form

Posted on 2003-11-24
7
Medium Priority
?
278 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 500 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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 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