Database Code
  Home arrow Database Code arrow Tell A Friend code that is used on ASPFree...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE CODE

Tell A Friend code that is used on ASPFree.com
By: aspfree
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2001-01-05

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    We've had several people request the use of our Tell-A-Friend code.  Here you go!

    Here is the code.

    <% @language="vbscript" %>
    <% Sub Thanks() %>

    <html>
    <head>
    <title>Thanks for referring ASPFree.com</title>
    </head>
    <body>

    <h2 align="center">Your Friends at ASPFree.com thank you recommending our website!</h2>
    <br>
    <br>

    </body>
    </html>

    <% End Sub %>

    <% Sub IntroPage() %>

    <html>
    <head>
    <title>Tell-A-Friend Script</title>
    </head>
    <body>

    <form method="POST" action="tellfriend.asp" name="form1">
    <h2 align="center">Tell your friends about ASPFree.com!</h2></center>

    <center>
    <br>
    <br>
    <table border="0" width="50%">
        <tr>
            <td width="38%"><b>Friends Email Address:</b></td>
            <td width="62%"><input type="text" name="FriendsEmailAddress" size="40"></td>
        </tr>
        <tr>
            <td colspan="2" width="100%"><center><i>Their email address, e.g. username@domain.com</i></center></td></tr> 
        <tr>
            <td width="38%"><b>Your Email Address</b></td>
            <td width="62%"><input type="text" name="YourEmailAddress" size="40"></td>
        </tr>
        <tr>
            <td align="center" colspan="2" width="100%"><center><i>Your email address, e.g. username@domain.com</i></td>
        </tr> 
        <tr>
            <td width="38%"><b>Subject</b></td>
            <td width="62%"><input type="text" name="Subject" size="40" value="Check out this page @ ASPFree.com"></td>
        </tr>
        <tr>
            <td width="38%"><b>Comments</b></td>
            <td width="62%">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" width="100%"><textarea rows="6" name="comments" cols="58">I recommend you check out this page : <% =         request("http_referer") %>
    at http://www.ASPFree.com.

    For ASPFree's forums-Quick, Easy to use, Searchable, Email when replyed to and more!!:
    http://www.aspfree.com/forum/forums.aspx
    </textarea> </td>
    </tr>
    </table>

    <br>
    <input type="submit" value="Send the Info!" name="btnSubmit"></center>
    <br>
    <br>
    <blockquote>

    This message sent to you from an associate as a service of ASPFree.com. For <br>
    live ASP demos, downloads, source code, forums and more! 
    <a href="http://www.aspfree.com/Default.asp">http://www.aspfree.com</a><br><br>
    <i>When the message is sent, you'll automatically be copied on the message. <br>
    The text immediately above will be added to the message automatically,<br>
    identifying the message as coming from ASPfree.com.</i><br>

    </blockquote>

    </form>
    </body>
    </html>

    <% End Sub %>

    <% Sub DoRecords() %>
    <%
    'Write to a database if so desired
    'dim strconn
    'dim conn
    'dim rs

    'set conn = server.createobject("adodb.connection")
    'conn.open strconn
    'set rs = server.createobject("adodb.recordset")
    'rs.open "PutYourTableNameHere", conn, 3, 3
    'rs.addnew
    'rs("name") = request("name")
    'rs("emailaddress") = request("emailaddress")
    'rs("phonenumber") = request("phonenumber")
    'rs("comments") = request("comments")
    'rs("DateSubmitted") = date()
    'rs.update
    'rs.close
    'set rs = nothing
    'conn.close
    'set conn = nothing

    strBody = "Your Friend has recommended you check out ASPFree.com: " & request("YourEmailaddress") & chr(10) & chr(10)
    strBody = strBody & "Friends Comments: " & chr(10) & request("comments") & chr(10) & chr(10) & chr(10)
    strBody = strBody & "This message sent to you from an associate as a service of ASPFree.com." 
    strBody = strBody & "For live ASP+, ASP demos, downloads, source code, forums and more!&nbsp; http://www.aspfree.com" 

    'Send a copy via an email
    set objNewMail = server.CreateObject("CDONTS.NewMail")
    objNewMail.From = request("YourEmailAddress")
    objNewMail.To = request("FriendsEmailAddress")
    objNewMail.CC = request("YourEmailAddress")
    objNewMail.BCC = "webmaster@somedomain.com"
    objNewMail.Subject = request("Subject")
    objNewMail.Body = strBody
    objNewMail.Send
    set objNewMail = Nothing
    response.redirect "tellfriend.asp?strMessage=Thanks"

    End Sub
    %>

    <% 
    If request("btnSubmit") = "" and request("strMessage") = "" Then
        call IntroPage()
    End If

    If request("btnSubmit") = "Send the Info!" Then
        call DoRecords()
    End If

    if request("strMessage") <> "" Then
        call Thanks()
    End If
    %>

    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Database Code Articles
    More By aspfree

     

    IBM® developerWorks developerWorks - FREE Tools!


    NEW! IBM Enterprise Modernization Sandbox for System z

    IBM Enterprise Modernization solutions help organizations evolve core IT systems towards modern architectures and technologies—reducing the burden of maintenance and freeing up resources to develop new business requirements and capabilities. With the IBM Enterprise Modernization Sandbox for System z you can evaluate IBM Enterprise Modernization solutions focused on five key areas: Assets, Architectures, Skills, Processes and Infrastructures, and Investment. Each solution is based upon real customer experiences and offers a proven path to get you started with your modernization projects.
    FREE! Go There Now!


    IBM DB2 Deep Compression ROI Tool

    The IBM DB2 Deep Compression ROI tool is designed for DBA’s and IT management personnel to perform a clinical analysis of the cost savings gained from the Storage Optimization feature of DB2 9 for Linux, UNIX and Windows. The feature, also known as Deep Compression, compresses data that lies within a database by up to 80% at times.
    FREE! Go There Now!


    NEW! Download DB2 9.5 for Linux, Unix, and Windows

    Download a free trial version of IBM DB2 9.5 for Linux, UNIX, and Windows. DB2 9 is the result of a five-year development project that transformed traditional (static) database technology into an interactive data server that merges the high performance and ease of use of DB2 with the self-describing benefits of XML.
    FREE! Go There Now!


    NEW! Try the IBM SOA Sandbox for Process

    Visit IBM developerWorks to try the IBM SOA Sandbox for process. The SOA Sandbox for process focuses on providing a trial environment with the necessary tooling and components required to gain a better understanding of business processes and how to best improve existing business processes to derive value quickly.
    FREE! Go There Now!


    NEW! Webcast: Introducing the new Information Server and Solutions community: LeverageInformation

    User communities play an important role in communication and collaboration around products, solutions and other areas of special interest to members. Successful communities are able to provide the right mix of content and services to deliver a value proposition that resonates with each audience. Join Tom Inman, VP of Marketing for Information and Platform Solutions as he introduces the new LeverageINFORMATION community. During this webcast, learn about the value provided by the community and how customers and partners derive value from the community in addressing their own technical and business challenges.
    FREE! Go There Now!


    NEW! Develop Systems Software Assets with IBM Rational Asset Manager

    Join us for this on demand webcast to learn about developing complex systems more quickly and efficiently. We'll cover market drivers for developing, governing and reusing systems software assets and how you can develop system software assets with Rational Asset Manager.
    FREE! Go There Now!


    NEW! Webcast: Eclipse: Empowering the universal platform

    The Eclipse community is constantly working to extend Eclipse's functionality. In this webcast, learn about some of the most important and feature-rich projects under development. From multi-language support to plug-in development, tune in to see what Eclipse is capable of now.
    FREE! Go There Now!


    NEW! Webcast: Extreme transaction processing with WebSphere Extended Deployment

    In this webcast, you'll get an introduction to the eXtreme Transaction Processing (XTP) features of WebSphere Extended Deployment and the common architectural traits required by XTP applications. See how WebSphere Extended Deployment's ObjectGrid feature provides a state-of-the-art infrastructure for hosting XTP applications.
    FREE! Go There Now!


    Role of Integrated Requirements Management in Software Delivery

    As organizations integrate software into every aspect of business, they are constantly pressured to deliver faster, better, and cheaper results. Unfortunately, a “dis-integrated” software delivery approach reduces returns while increasing costs. This IBM Rational White Paper shows how Integrated Requirements Management aligns organizations around maximizing value and keeping pace with change.
    FREE! Go There Now!


    NEW! Successful Change and Release Management for .NET

    Join this webcast to discover the key requirements for successful change and release management. Learn how to extend your .NET environment to improve productivity and collaboration, and address core problems afflicting team development. In this webcast, we’ll review typical challenges faced by customers and how to resolve them with the IBM Rational Change and Release Management solution, including Rational ClearCase, Rational ClearQuest and Rational Build Forge. Replay is available for 9 months.
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    DATABASE CODE ARTICLES

    - Deployment of the MobiLink Synchronization M...
    - MobiLink Synchronization Wizard in SQL Anywh...
    - Finding Matching Records in Data Access Pages
    - Using the AccessDataSource Control in VS 2005
    - A Closer Look at ADO.NET: The Command Object
    - A Closer Look at ADO.NET: The Connection Obj...
    - Using ADO to Communicate with the Database, ...
    - Code Snippets: Counting Records
    - Constraints In Microsoft SQL Server 2000
    - Multilingual entries into a DB and to be dis...
    - Getting A List of Tables From SQL Server
    - SQL Server Database Creator - .NET Version
    - ADO Recordset Paging
    - Two combos, one textbox example
    - Discussion & Listserv Module by Mike Eck...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway