Welcome to WebmasterWorld Guest from 54.92.197.82

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
posts:2
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:

<HTML>
<HEAD>
<TITLE>Contact Page</TITLE>
</HEAD>
<BODY BGCOLOR="553505">
<FONT COLOR="FFFFAA">
<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.
</FONT>
<P>
<FORM METHOD="POST" ACTION="/cgi-local/mailform.cgi">
<TABLE BORDER="0" CELLPADDING="3">
<TR>
<TD ALIGN="right"><FONT FACE="helvetica,arial" COLOR="FFFFAA">Your Name:</TD>
<TD><INPUT NAME="name" SIZE="40"></TD>
</TR>
<TR>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Email Address:</TD>
<TD><INPUT NAME="email" SIZE="40"></TD>
</TR>
<TR>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Phone Number:</TD>
<TD><INPUT NAME="phone" SIZE="40"></TD>
</TR>
<TR>
<TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Subject:</TD>
<TD><SELECT NAME="subject">
<OPTION>(please pick one)
<OPTION>Report a problem
<OPTION>Articles
<OPTION>Interesting information
<OPTION>Other (state below)
</SELECT></TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="center">
<TEXTAREA ROWS="7" COLS="55" NAME="note"></TEXTAREA>
<BR>
<INPUT TYPE="submit" VALUE="Please Contact Me">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>

And here's that mailform.cgi thing:

#!/usr/local/bin/perl
require ('cgi-lib.pl');

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

&ReadParse;

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";
&showFile("../thanks.html");

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
posts:1834
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.

WBF

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

Preferred Member

10+ Year Member

joined:July 16, 2001
posts:545
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
posts:2
votes: 0


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