logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Painting
Heart Disease
Horror Literature
Dating
Hiking & Backpacking
SF/Fantasy Books
Healthy Foods


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Creating WebSite Specific Postcards

Guest Author - Lisa Shea

Postcards, e-cards, and e-messages are extremely popular on the web. Here is how you can code your own site-specific postcards for your website, using ASP.

First, visit the BellaOnline Postcards area to get a sense how our postcards here work. They are fully code in ASP.

At the most basic level, postcard code is a form. You input your own email address, the destination email address, and a message. You also choose an image. All of those things are done with a basic HTML form, no ASP is necessary.

On the processing page, the ASP script takes each of those values into a variable. You use standard ASP commands (found on this site) to first get the maximum postcard ID from a counter table in your database, and to increment it by 1. You write that new number back to the database. Now you are able to construct the postcard's file name, let's say it is

postcard999.html

Now comes what might be deemed the "tricky" part. You need to write out a HTML file called postcard999.html on your webserver for the end user to view. This HTML fiel will "look" like a postcard page, and will be what you tell the recipient to view. It needs to be a fully valid HTML document.

So you open a file, named postcard999.html, with standard ASP file open commands. You then start to write to this file lines such as

<HTML>
<HEAD>
<TITLE>Site Postcard<\title>
</HEAD>
<BODY>

Here is where you write the layout for your postcard page. It really helps if initially you write the very barest of bones - an IMG SRC to show the picture, and then a TO: with the to email, and a FROM with the from email. Start very simple. Once you get that working, you can start to make it more fancy.

Once you close out the file, it is time to send the email message. Use standard ASP commands to send a message "to" the to address, and "from" the from address. The body of the message would say that a postcard has been created, and the full URL of that postcard999.html should be provided.

Once that is done, redirect the user to a thank you page, thanking them for creating a postcard in your system.

That's it! Experiment at first with a single postcard image. Make sure that you can get the to, from and message from the user, and construct the postcard file and send the message. Once you get those basics down, it should be easy to expand the system so the postcards are more pretty, and so that you have more options to work with, including stamps, songs, borders, and more.
This site needs an editor - click to learn more!

Add Creating+WebSite+Specific+Postcards to Twitter Add Creating+WebSite+Specific+Postcards to Facebook Add Creating+WebSite+Specific+Postcards to MySpace Add Creating+WebSite+Specific+Postcards to Del.icio.us Digg Creating+WebSite+Specific+Postcards Add Creating+WebSite+Specific+Postcards to Yahoo My Web Add Creating+WebSite+Specific+Postcards to Google Bookmarks Add Creating+WebSite+Specific+Postcards to Stumbleupon Add Creating+WebSite+Specific+Postcards to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2013 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor