Contact page

  • lotri
  • Newbie
  • Newbie
  • lotri
  • Posts: 6

Post 3+ Months Ago

need help making a contact page. here is what i have now:

Code: [ Select ]
<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>
  1. <HTML>
  2. <HEAD>
  3.  <TITLE>Contact Page</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR="553505">
  6.  <FONT COLOR="FFFFAA">
  7.   <H3>Contacting Us Online</H3>
  8.   Send us an e-mail if you want to submit an article on any recent performances, report a problem, or anything else you need.
  9.  </FONT>
  10.  <P>
  11.  <FORM METHOD="POST" ACTION="/cgi-local/mailform.cgi">
  12.   <TABLE BORDER="0" CELLPADDING="3">
  13.   <TR>
  14.    <TD ALIGN="right"><FONT FACE="helvetica,arial" COLOR="FFFFAA">Your Name:</TD>
  15.    <TD><INPUT NAME="name" SIZE="40"></TD>
  16.   </TR>
  17.   <TR>
  18.    <TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Email Address:</TD>
  19.    <TD><INPUT NAME="email" SIZE="40"></TD>
  20.   </TR>
  21.   <TR>
  22.    <TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Phone Number:</TD>
  23.    <TD><INPUT NAME="phone" SIZE="40"></TD>
  24.   </TR>
  25.   <TR>
  26.    <TD ALIGN="right"><FONT FACE="helvetica, arial" COLOR="FFFFAA">Subject:</TD>
  27.    <TD><SELECT NAME="subject">
  28.    <OPTION>(please pick one)
  29.    <OPTION>Report a problem
  30.    <OPTION>Articles
  31.    <OPTION>Interesting information
  32.    <OPTION>Other (state below)
  33.    </SELECT></TD>
  34.   </TR>
  35.   <TR>
  36.    <TD COLSPAN="2" ALIGN="center">
  37.    <TEXTAREA ROWS="7" COLS="55" NAME="note"></TEXTAREA>
  38.    <BR>
  39.    <INPUT TYPE="submit" VALUE="Please Contact Me">
  40.    </TD>
  41.   </TR>
  42.   </TABLE>
  43.  </FORM>
  44. </BODY>
  45. </HTML>


and the mailform.cgi:

Code: [ Select ]
#!/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";
     }
}
  1. #!/usr/local/bin/perl
  2. require ('cgi-lib.pl');
  3. $mailprog = "/usr/lib/sendmail";
  4. $sendto  = "*****\@hotmail.com";
  5. &ReadParse;
  6. if (length($in{'name'}) eq 0 || length($in{'email'}) eq 0) {
  7.  print "Content-type: text/html\n\n<BODY BGCOLOR="553505">\n"
  8.  print "<FONT COLOR="FFAAAA">\n"
  9.  print "<H2>There's a Problem:</H2>\n";
  10.  print "<blockquote>\n<blockquote>\n";
  11.  print "You need to at least specify a name and email address ";
  12.  print "for us to process this form. Please back up and ensure";
  13.  print "that you've filled out the form correctly.";
  14.  print "</BODY></HTML>";
  15.  exit 0;
  16. }
  17. if (open MAIL, "|$mailprog $sendto") {
  18.   print MAIL "To: $sendto\n";
  19.   print MAIL "From : *************** (Lost Art Institute Web Site)";
  20.   print MAIL "Subject: Your Query to Lost Art Institute\n";
  21.   print MAIL "Reply-To: $in{'email'}\n\n";
  22.   print MAIL "Here's their message:\n\n";
  23.   print MAIL " Name: $in{'name'}\n";
  24.   print MAIL " Email: $in{'email'}\n";
  25.   print MAIL " Phone: $in{'phone'}\n";
  26.   print MAIL " Subject: $in{'subject'}\n";
  27.   print MAIL "And their note:\n\n $in{'note'}\n";
  28.   close MAIL;
  29. }
  30. print "Content-type: text/html\n\n";
  31. &showFile("../thanks.html");
  32. exit 0;
  33. sub showFile
  34. {
  35.     if (open INPUT, $_[0]) {
  36.       while (<INPUT>) {
  37.        print $_;
  38.       }
  39.       close INPUT;
  40.      }
  41.      else {
  42.        print "<BODY BGCOLOR=\"553505\"><BR><BR><FONT FACE=\"arial\" COLOR=\"FFFFAA\">\n";
  43.        print "Thank you for your submission.<BR>\n";
  44.      }
  45. }
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

What exactly did you want help with?
  • lotri
  • Newbie
  • Newbie
  • lotri
  • Posts: 6

Post 3+ Months Ago

oh never mind about this now. i found another way to do it. thanx anyways
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

would you mind explaining a little on what it is you needed and how it
was fixed? We like to have closure on our problems if possible. :D
  • lotri
  • Newbie
  • Newbie
  • lotri
  • Posts: 6

Post 3+ Months Ago

i was trying to make one from scratch but i kept getting a message form yahoo that the script was not authorized or something. so i looked through the yahoo web hosting thing and found their form processing form.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

i see - still good info, thanks! glad you got it worked out. :D

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 117 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.