Webnew
07-10-2009, 09:56 PM
Hello All,
I'm new for this forum.
I'm learning about web programming and I'm stuck at my form page. I'm using PERL form for my contact us form and when I click on submit button, I'm not getting my confirmation.shtml which is included with my header, navigation and footer.
My question is what I should do so, when I click on submit button, I get the confirmation.shtml page.
Thanks.
Here is my sendmail.pl code.
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
$title= 'Acme Mail Confirmation';
$to= 'webdevteacher@gmail.com';
$from= 'cooks@yahoo.com';
$subject= 'Acme Mail Confirmation';
open(MESSAGE, "|/usr/sbin/sendmail");
## MESSAGE Header
print MESSAGE "To: $to\n";
print MESSAGE "From: $from\n";
print MESSAGE "Subject: $subject\n\n";
close(MESSAGE);
## HTML content lets user know we sent an email
print "<html><head><title>$title</title><head>\n<body>\n\n";
print "<h1>$title</h1>\n";
print "<p>Hello Friend,\n";
print "<p>Thank you for visiting Acme Indian Arts Store. Also thank you for your feedback. If you have provided your email address, we will contact shortly.\n";
print "<p>Thank you for your patronage.\n";
print "<p>A message has been sent from $from to $to";
print "\n\n</body></html>";
Also I have a separate Shtml for confirmation which is called confirmation.shtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- BOF: Generated Meta Tags -->
<meta name="description" content="Acme Widget - the Indian Art Store of your choice." />
<meta name="keywords" content="Arts and Crafts, Statues, Jewelry, Paintings, Spiritual Accessories." />
<meta name="author" content="P-----y, Web Developer" />
<meta name="copyright" content="2009, P-------y" />
<meta name="reply-to" content="info[at]acmewidget.com" />
<title>Acme Widget - Arts and Crafts of India</title>
<!-- EOF: Generated Meta Tags -->
<link rel="stylesheet" href="css.sheet1.css" type="text/css" />
<script type="text/javascript">
<!-- Hide from old browsers
function createWindow(cUrl,cName,cFeatures)
{
var xWin = window.open(cUrl,cName,cFeatures)
}
//-->
</script>
</head>
<body>
<!--#include virtual="/header.inc" -->
<!--#include virtual="/navigation.inc" -->
<div class="headerphoto"></div>
<div style="text-align:center;font-size:xx-large;margin-top:100px;margin-bottom:100px">Thank you for your inquiry.
</div>
<!-- end of Main Content -->
<!--#include virtual="/footer.inc" -->
</body>
</html>
I'm new for this forum.
I'm learning about web programming and I'm stuck at my form page. I'm using PERL form for my contact us form and when I click on submit button, I'm not getting my confirmation.shtml which is included with my header, navigation and footer.
My question is what I should do so, when I click on submit button, I get the confirmation.shtml page.
Thanks.
Here is my sendmail.pl code.
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
$title= 'Acme Mail Confirmation';
$to= 'webdevteacher@gmail.com';
$from= 'cooks@yahoo.com';
$subject= 'Acme Mail Confirmation';
open(MESSAGE, "|/usr/sbin/sendmail");
## MESSAGE Header
print MESSAGE "To: $to\n";
print MESSAGE "From: $from\n";
print MESSAGE "Subject: $subject\n\n";
close(MESSAGE);
## HTML content lets user know we sent an email
print "<html><head><title>$title</title><head>\n<body>\n\n";
print "<h1>$title</h1>\n";
print "<p>Hello Friend,\n";
print "<p>Thank you for visiting Acme Indian Arts Store. Also thank you for your feedback. If you have provided your email address, we will contact shortly.\n";
print "<p>Thank you for your patronage.\n";
print "<p>A message has been sent from $from to $to";
print "\n\n</body></html>";
Also I have a separate Shtml for confirmation which is called confirmation.shtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- BOF: Generated Meta Tags -->
<meta name="description" content="Acme Widget - the Indian Art Store of your choice." />
<meta name="keywords" content="Arts and Crafts, Statues, Jewelry, Paintings, Spiritual Accessories." />
<meta name="author" content="P-----y, Web Developer" />
<meta name="copyright" content="2009, P-------y" />
<meta name="reply-to" content="info[at]acmewidget.com" />
<title>Acme Widget - Arts and Crafts of India</title>
<!-- EOF: Generated Meta Tags -->
<link rel="stylesheet" href="css.sheet1.css" type="text/css" />
<script type="text/javascript">
<!-- Hide from old browsers
function createWindow(cUrl,cName,cFeatures)
{
var xWin = window.open(cUrl,cName,cFeatures)
}
//-->
</script>
</head>
<body>
<!--#include virtual="/header.inc" -->
<!--#include virtual="/navigation.inc" -->
<div class="headerphoto"></div>
<div style="text-align:center;font-size:xx-large;margin-top:100px;margin-bottom:100px">Thank you for your inquiry.
</div>
<!-- end of Main Content -->
<!--#include virtual="/footer.inc" -->
</body>
</html>