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! |
Hold your calendar on January 30, 2008 for this free webcast on the new i5/OS. Rational's Enterprise Modernization products will be discussed at this webcast as they help to drive the application development environment for this new System i OS. <br />And learn how i5/OS will take you to the next step of efficient, resilient business processing. You will hear about the new i5/OS capabilities as it will be the most significant i5/OS release in years. If you cannot join the webcast on 1/30/08 you can still use this link to listen to the replay.<br /> FREE! Go There Now!
|
|
|
|
Poor Requirements Management capabilities in an Enterprise have been linked to excessive project failures, escalating IT costs, and failure to deliver competitive advantage into the marketplace. Join Brianna M Smith from IBM Rational and learn about how successful organizations align IT and Business stakeholders through collaborative processes and tools for effective requirements management, and how an integrated approach across the IT lifecycle can provide unparalleled visibility and traceability to ensure that project teams are delivering on the business vision by "doing the right things" and "doing things right." FREE! Go There Now!
|
|
|
|
Download the Rational Application Developer (RAD) v7.5 open beta code and start developing applications for the JEE5 standard which features EJB3.0, JPA, JSF 1.2, JSP 2.1 and Servlet 2.5 standards. When you use this beta you will see how you can increase developer productivity for already existing applications with improved support for refactoring, as well as adding new features to existing applications. In addition, the beta provides tooling for JD Edwards, Oracle, SAP, Siebel and PeopleSoft to improve the developer productivity with these enterprise systems. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial version of Lotus Quickr 8.0, which enables collaboration by transforming the way everyday business content such as documents, rich media, photos, and video can be shared. Lotus Quickr makes it faster and easier to share content of all types (not just documents) within virtual teams. It is designed to make it easier to collaborate across organizational boundaries, while continuing to work within the context of familiar desktop applications. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download IBM DB2 Express-C 9.5, a no-charge version of DB2 Express 9 database server. DB2 Express-C offers the same core data server base features as other DB2 Express editions and provides a solid base to build and deploy applications developed using C/C++, Java, .NET, PHP, and other programming languages. FREE! Go There Now!
|
|
|
|
Download a free trial version of IBM Rational Developer for System z, software that can help you deliver core development capabilities; the power of Java Platform, Enterprise Edition (Java EE); and rapid application development support to diverse enterprise application development teams. With comprehensive development tools to help create, deploy and maintain traditional enterprise and composite applications, Rational Developer for System z enables developers with different technical backgrounds to easily participate in important technology projects. FREE! Go There Now!
|
|
|
|
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!
|
|
|
|
Informix Dynamic Server (IDS) Express Edition offers outstanding online transaction processing (OLTP) database performance, while helping to simplify and automate many of the tasks associated with deploying databases for small business applications. IDS 11 further extends the ease of management and applications integration with the Admin API and Scheduler, high availability with Continuous Log Restore for backup server recovery in case of a primary server failure, and column level encryption to protect personal and company private data. FREE! Go There Now!
|
|
|
|
You can now evaluate IBM Rational Asset Manager V7.0 online without installing or configuring it on your own system! Rational Asset Manager helps create, modify, govern, find, and reuse any type of development assets, including SOA and systems development assets. Rational Asset Manager helps you reduce software development costs and improve quality by facilitating the reuse of all types of software development-related assets. Visit developerWorks to learn more about this product and register to explore its capabilities online. FREE! Go There Now!
|
|
|
|
Join the IBM Watchfire team for an informative discussion on techniques and best practices to proactively manage Web application security and how to effectively build application security testing into the software development lifecycle (SDLC). In this Software Delivery Platform webcast you will learn: How to better understand potential web application security vulnerabilities, best practices and how to effectively integrate application security testing into the software development lifecycle, the importance of detecting and removing software vulnerabilities during application development. FREE! Go There Now!
|
|
|
|
All FREE IBM® developerWorks Tools! |