Gossamer Forum
Home : Products : DBMan : Customization :

e-mail form

Quote Reply
e-mail form
Hi,
I would like to to set up a form for visitors to reply to a classified.

In the long display of a record there is at present an e-mail adres of the person who posted the classified. I would like to substitute a "Reply" button there that opens a form containing the relevant data of that record to be posted to the owner of the classified by e-mail.

The reason for this is that I would like those who have posted a free classified to know that the reaction is coming from my site. This by adding something like; "A Classic Boatworld visitor has replyed to your ad". Also,the person replying to the classified would not need to retype the information.

In the form I would add a form field for the visitor to enter their e-mail adres so that the poster of the classified can get in touch with them.

OK I know you guys apreciate it when we get our own hands dirty in cgi (how else will we learn?)so this is as far as I've gotten;

%rec = &get_record($in{$db_key});

open (MAIL, "$mailprog") | | &cgierr("Can't start mail program");
print MAIL "To: $in{'email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: A Classic Boatworld visitor has replied to
the following boat listing you have posted.your\n\n";

print MAIL "Listing #:$rec{'Listing'}\n\n";
print MAIL "Builder/Designer:$rec{'Builder'}\n\n";
print MAIL "Model:$rec{'Model'}\n\n";
print MAIL "Your Company's Boat ID number $rec{'BrokersID'}\n\n";
print MAIL "Please contact $html_title support at: $admin_email\n";
print MAIL "if you have any questions.\n\n";
close (MAIL);

I think I can build the form in my html editor substituting the field values with $rec{'example'}but need help & suggestions how to connect up with dbman in order to accomplish the above.

Regards,HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: e-mail form In reply to
Hello HJ,

Try installing the "Private Email Mod" located on the following web page:

www.jpdeni.com/dbman/mods.html

It does everything you are requesting.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: e-mail form In reply to
Thanks Eliot,

I have been on JPD's page a couple of times
and did not realize I was trying to invent another wheel.

Thanks again for pointing the old nose in the right direction!

Regards,

------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: e-mail form In reply to
No problem.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: e-mail form In reply to
Hi Eliot,

I have run into a small problem installing the private e-mail mod.
According to the mod I need to do the following;

#file: html.pl
# sub html_record

# Just after
# my (%rec) = @_;
#
# Add
############################

$rec{$db_key} =~ s/<?.B>//g;

However as I'm using the short long html.pl the $rec{$db_key} =~ s/<.?B>//g; already appears in both the sub html_record and the sub html_record_long.

As the e-mail addres only appears in the long record I assume thats where to place the $rec{$db_key} =~ s/<?.B>//g; refered to in the private e-mail mod.

As mentioned above when I looked in the sub html_record_long this code already seems to be there maybe due to a previous modification.

However when I compare whats there with what is suggested in the private e-mail mod I see the following difference:

$rec{$db_key} =~ s/<?.B>//g; from private e-mail mod
$rec{$db_key} =~ s/<.?B>//g; already in sub html_record_long

So now I'm not sure which to use or both?

Just for reference I have installed the followin other mods;
Secure password
Validate records
File upload

Regards,
HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net