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%"> </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! 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
developerWorks - FREE Tools! |
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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!
|
|
|
|
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! |