Welcome to WebmasterWorld Guest from

Forum Moderators: keyplyr & mack

Message Too Old, No Replies

Contact Page

making contact page

11:29 pm on Jun 19, 2003 (gmt 0)

New User

10+ Year Member

joined:June 19, 2003
votes: 0

can anyone help me with making a contact page? i have a book to help me but it's not really working.

Here's my page:

<TITLE>Contact Page</TITLE>
<BODY BGCOLOR="553505">
<H3>Contacting Us Online</H3>
Send us an e-mail if you want to submit an article on any recent performances, report a problem, or anything else you need.
<FORM METHOD="POST" ACTION="/cgi-local/mailform.cgi">
<TD ALIGN="right"><FONT FACE="helvetica,arial" COLOR="FFFFAA">Your Name:</TD>
<TD><INPUT NAME="name" SIZE="40"></TD>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Email Address:</TD>
<TD><INPUT NAME="email" SIZE="40"></TD>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Phone Number:</TD>
<TD><INPUT NAME="phone" SIZE="40"></TD>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Subject:</TD>
<TD><SELECT NAME="subject">
<OPTION>(please pick one)
<OPTION>Report a problem
<OPTION>Interesting information
<OPTION>Other (state below)
<TD COLSPAN="2" ALIGN="center">
<INPUT TYPE="submit" VALUE="Please Contact Me">

And here's that mailform.cgi thing:

require ('cgi-lib.pl');

$mailprog = "/usr/lib/sendmail";
$sendto = "******\@hotmail.com";


if (length($in{'name'}) eq 0 length($in{'email'}) eq 0) {
print "Content-type: text/html\n\n<BODY BGCOLOR="553505">\n"
print "<FONT COLOR="FFAAAA">\n"
print "<H2>There's a Problem:</H2>\n";
print "<blockquote>\n<blockquote>\n";
print "You need to at least specify a name and email address ";
print "for us to process this form. Please back up and ensure";
print "that you've filled out the form correctly.";
print "</BODY></HTML>";
exit 0;

if (open MAIL, "$mailprog $sendto") {
print MAIL "To: $sendto\n";
print MAIL "From : ********** (Lost Art Institute Web Site)";
print MAIL "Subject: Your Query to Lost Art Institute\n";
print MAIL "Reply-To: $in{'email'}\n\n";
print MAIL "Here's their message:\n\n";
print MAIL " Name: $in{'name'}\n";
print MAIL " Email: $in{'email'}\n";
print MAIL " Phone: $in{'phone'}\n";
print MAIL " Subject: $in{'subject'}\n";
print MAIL "And their note:\n\n $in{'note'}\n";
close MAIL;

print "Content-type: text/html\n\n";

exit 0;
sub showFile
if (open INPUT, $_[0]) {
while (<INPUT>) {
print $_;
close INPUT;
else {
print "<BODY BGCOLOR=\"553505\"><BR><BR><FONT FACE=\"arial\" COLOR=\"FFFFAA\">\n";
print "Thank you for your submission.<BR>\n";

11:58 pm on June 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 1, 2002
votes: 0

Does your server have Perl installed? If so, does it have the necessary modules being called by this script?

Oftentimes a server will have a prepackaged form handler script that you can use. You might contact your server and ask.


12:04 am on June 20, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:July 16, 2001
votes: 0

Some indicator of what went wrong would help in making it work...
2:32 pm on June 20, 2003 (gmt 0)

New User

10+ Year Member

joined:June 19, 2003
votes: 0

hey, i found another way to make this page. thanx anyways

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members