Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2003
Posts: 179
Member
Member
Offline
Joined: Feb 2003
Posts: 179
just to follow thru on this topic and 'splain what i did in case somebody searches it up someday and wants to do something similar...

I created a vendor sign-up form for one of the free services on my site (Daily Spotlight... a rotating photo showcase thats rss-driven)

http://dragboatalley.com/spotform.htm

the form action points to my custom rox_mail_wrap.cgi script that reads in the form fields, assembles an email, and sends it off to me. The visitor gets a standard transition page and then dumped back off at my portal home page. Fairly simple, only trick i did to save a few lines of scripting was made the send-to addy and email subject hidden form fields.

The gist of the script is shown here:
http://dragboatalley.com/rox_mail_wrap.txt

the only thing i tweaked from whats shown above is how the actual message part of the email is assembled. this little bit of the script didnt gimme a clean list of "fieldname = value" lines like i thought it would frown

Code
 	# build message string
foreach my $key (%in) { $message .= "$key = $in{$key}\n"; }

now if i ever need to reuse this script with another form, I'll revisit that bit of generic-message-assembly logic and figure it out rightly. but for time being i took a shortcut and just hardcoded the formfield names and concatenated my email message text like this:

Code
	$message = "company = $in{'company'}\n";
$message .= "Member = $in{'memberid'}\n";
$message .= "URL = $in{'siteurl'}\n";
$message .= "Salespitch = $in{'pitch'}\n";
$message .= "Contact block = $in{'contact'}\n";
$message .= "Spotlight Plan = $in{'plan'}\n";
$message .= "Notes = $in{'notes'}\n";

Sponsored Links
Entire Thread
Subject Posted By Posted
reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 4:01 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 4:15 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 4:23 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 4:30 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 5:00 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 5:11 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 5:28 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 6:54 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 8:45 PM
Re: reusing custom script from 6.5 in 6.7.2 The Team 07/26/2006 9:19 PM
Re: reusing custom script from 6.5 in 6.7.2 The Team 07/26/2006 9:27 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 9:54 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 10:09 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/26/2006 10:28 PM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/26/2006 10:39 PM
Re: reusing custom script from 6.5 in 6.7.2 AllenAyres 07/27/2006 12:11 AM
Re: reusing custom script from 6.5 in 6.7.2 RoxSeibert 07/27/2006 3:48 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 6869
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 17
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)