Post the page minus the php we gave you and we will re-post it with the correct code.
Aric
Aric
<!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" xml:lang="en">
<head>
<title>Codetuts-CppInquiry</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Your description goes here." />
<meta name="keywords" content="your,keywords,goes,here" />
<meta name="author" content="Brett Hillesheim" />
<link rel="stylesheet" href="css.css" type="text/css" media="screen" />
<link href="/contact.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="container">
<div id="sitename">
<h1>Codetuts-CppInquiry</h1>
</div>
<div class="tabsF" id="tabsF" dir="ltr" lang="en" onclick="http://www.codetuts.com
">
<ul>
<li><a href="index.html" title="CppInquiry"><span>Home</span></a></li>
<li><a href="programs.html" title="Programs/Source"><span>Programs/Source</span></a></li>
<li><a href="construction.html" title="Tutorials"><span>Tutorials</span></a></li>
<li><a href="construction.html" title="Articles"><span>Articles</span></a></li>
<li><a href="construction.html" title="Forum"><span>Forum</span></a></li>
<li><a href="http://www.codetuts.com" title="Codetuts.com"><span>Codetuts</span></a></li>
<li class="linklist"><a href="construction.html" title="Archives"><span>Archives </span></a></li>
<li><a href="#" title="Contact Us"><span>Contact Us</span></a></li>
</ul>
</div>
<div #tabsf>
<ul>
<il>
<a> <span></span></a>
</ul>
</div>
<div id="wrap">
<br/><br/>
<div id="rightside">
<h1>Links</h1>
<ul class="linklist">
<li><a href="http://www.omnamo.com">Omnamo</a></li>
<li><a href="construction.html">Gallery</a></li>
<li><a href="construction.html">Affiliates</a></li>
<li><a href="http://oswd.org">OSWD.org</a></li>
</ul>
<h1> </h1>
<h1>Latest Announcements</h1>
<div id="scroll2">
<p><strong>Year of 2006 </strong></p>
<p><strong>Dec.11: </strong>Creation of Codetuts-Sravan ftp site</p>
<p><strong>Dec.13: </strong>First uploading of the site's layout thanks to Brett7481</p>
<p><strong>Dec. 15:</strong> Change of name to CppInquiry </p>
<p><strong>Dec. 16: </strong>Programs/Source section is up</p>
<p><strong>Dec. 16: </strong>Created "Under Constructions" pages for CppInquiry</p>
</div>
<h1> </h1>
</div>
<div id="contentalt" >
<div id="scroll">
</div>
<p> </p>
</div>
<div class="clearingdiv"> </div>
</div>
<div id="footer">@2006 Codetuts-CppInquiry| Design by <a href="http://www.ibentmywookie.org">Brett7481</a></div>
</div>
</body>
</html>
<?php
################################################## ###############################
#
# mail.php - general-purpose email form and script
#
# copyright June 2005 by Charles Reace
#
# This software available as open source software under the Gnu General Public
# License: http://www.gnu.org/licenses/gpl.html
#
################################################## ##############################
################################################## ##############################
# user-defined variables - update for your email address(es) ################################################## ##############################
# home page for link at top of page:
$home = "http://www.yourdomain.com/";
# Modify the following variables to set up where emails will be sent.
# $toName will be concatenated with a "@" and then $toDomain to create
# the complete email address.
$toName = "johndoe"; # the part that goes before the @
$toDomain = "yourdomain.com"; # the part that comes after the @
# uncomment and edit the next two lines if you want to cc someone:
$ccName = "ccname";
$ccDomain = "ccdomain.com";
# uncomment and edit the next two lines if you want to bcc someone:
$bccName = "bccname";
$bccDomain = "bccdomain.com";
#################################
# end of user-defined variables
##################################
# email address validation function
# kudos to http://iamcal.com/publish/articles/php/parsing_email/pdf/
function is_valid_email_address($email) {
$qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]';
$dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]';
$atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c'.
'\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+';
$quoted_pair = '\\x5c\\x00-\\x7f';
$domain_literal = "\\x5b($dtext|$quoted_pair)*\\x5d";
$quoted_string = "\\x22($qtext|$quoted_pair)*\\x22";
$domain_ref = $atom;
$sub_domain = "($domain_ref|$domain_literal)";
$word = "($atom|$quoted_string)";
$domain = "$sub_domain(\\x2e$sub_domain)*";
$local_part = "$word(\\x2e$word)*";
$addr_spec = "$local_part\\x40$domain";
return preg_match("!^$addr_spec$!", $email) ? 1 : 0;
}
# Init. some variables:
$error = "";
$success = FALSE;
# process form if submitted:
if(isset($_POST['submit'])){
foreach($_POST as $key => $val) {
if (empty($_POST[$key])) {
$error .= "You must enter a value for " .
ucwords(str_replace("_"," ",$key)) . ". ";
}
else {
if(get_magic_quotes_gpc()) {
$_POST[$key] = stripslashes($val);
}
}
if($key != 'message') {
$_POST[$key] = preg_replace('/[\r\n]/', ' ', $val);
}
}
if($_POST['email_address'] != $_POST['repeat_email']) {
$error .= "Email Address is not the same as Repeat Email. ";
}
elseif(is_valid_email_address($_POST['email_address']) == 0) {
$error .= "'{$_POST['email_address']}' does not appear to be a valid email address. ";
}
if(empty($error)) # no errors in input, so go ahead and email it.
{
$to = "$toName@$toDomain";
$headers = "From: ".preg_replace('/[\r\n]+/',' ', $_POST['email_address']);
if(!empty($ccName) and !empty($ccDomain)) {
$headers .= "\r\nCc: $ccName@$ccDomain";
}
if(!empty($bccName) and !empty($bccDomain)) {
$headers .= "\r\nBcc: $bccName@$bccDomain\r\n\r\n";
}
$headers .= "\r\nX-Mailer: PHP/" . phpversion();
$msg = "From {$_POST['name']} ({$_POST['email_address']})";
$msg .= "\n\n\n{$_POST['message']}";
echo "<pre>$headers"; exit;
$result = @mail($to,
stripslashes($_POST['subject']),
$msg,
$headers);
if(!$result) {
$error = "There was an unknown error while attempting to send your email.";
}
else {
header("Location: http://www.charles-reace.com/Email_Me/thanks.php");
}
}
}
?>
<!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" xml:lang="en">
<head>
<title>Codetuts-CppInquiry</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Your description goes here." />
<meta name="keywords" content="your,keywords,goes,here" />
<meta name="author" content="Brett Hillesheim" />
<link rel="stylesheet" href="css.css" type="text/css" media="screen" />
<link href="/contact.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="container">
<div id="sitename">
<h1>Codetuts-CppInquiry</h1>
</div>
<div class="tabsF" id="tabsF" dir="ltr" lang="en" onclick="http://www.codetuts.com
">
<ul>
<li><a href="index.html" title="CppInquiry"><span>Home</span></a></li>
<li><a href="programs.html" title="Programs/Source"><span>Programs/Source</span></a></li>
<li><a href="construction.html" title="Tutorials"><span>Tutorials</span></a></li>
<li><a href="construction.html" title="Articles"><span>Articles</span></a></li>
<li><a href="construction.html" title="Forum"><span>Forum</span></a></li>
<li><a href="http://www.codetuts.com" title="Codetuts.com"><span>Codetuts</span></a></li>
<li class="linklist"><a href="construction.html" title="Archives"><span>Archives </span></a></li>
<li><a href="#" title="Contact Us"><span>Contact Us</span></a></li>
</ul>
</div>
<div #tabsf>
<ul>
<il>
<a> <span></span></a>
</ul>
</div>
<div id="wrap">
<br/><br/>
<div id="rightside">
<h1>Links</h1>
<ul class="linklist">
<li><a href="http://www.omnamo.com">Omnamo</a></li>
<li><a href="construction.html">Gallery</a></li>
<li><a href="construction.html">Affiliates</a></li>
<li><a href="http://oswd.org">OSWD.org</a></li>
</ul>
<h1> </h1>
<h1>Latest Announcements</h1>
<div id="scroll2">
<p><strong>Year of 2006 </strong></p>
<p><strong>Dec.11: </strong>Creation of Codetuts-Sravan ftp site</p>
<p><strong>Dec.13: </strong>First uploading of the site's layout thanks to Brett7481</p>
<p><strong>Dec. 15:</strong> Change of name to CppInquiry </p>
<p><strong>Dec. 16: </strong>Programs/Source section is up</p>
<p><strong>Dec. 16: </strong>Created "Under Constructions" pages for CppInquiry</p>
</div>
<h1> </h1>
</div>
<div id="contentalt" >
<div id="scroll">
<h2>Email Me</h2>
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method=post>
<fieldset>
<legend>Your Contact Information</legend>
<p><label for='name' class='lab'>Name:</label>
<input type='text' name='name' id='name' size='30' maxlength='40'<?php
if(!empty($_POST['name'])){
echo "value='{$_POST['name']}'";
}
?>></p>
<p><label for='email_address' class='lab'>Email Address:</label>
<input type='text' name='email_address' id='email_address' size='30' maxlength='40'<?php
if(!empty($_POST['email_address'])){
echo "value='{$_POST['email_address']}'";
}
?>></p>
<p><label for='repeat_email' class='lab'>Repeat Email:</label>
<input type='text' name='repeat_email' id='repeat_email' size='30' maxlength='40'<?php
if(!empty($_POST['repeat_email'])) {
echo "value='{$_POST['repeat_email']}'";
}
?>></p>
</fieldset>
<p> </p>
<fieldset>
<legend>Message</legend>
<p><label for='subject' style="margin-left:3px;display: block; float: left; width: 9em;">Subject:</label>
<input type='text' name='subject' id='subject' size='50' maxlength='60'<?php
if(!empty($_POST['subject'])){
echo " value='{$_POST['subject']}'";
}
?>></p>
<p><label for='message' style="margin-left:3px;display: block; float: left; width: 9em;">Message:</label>
<textarea name='message' id='message' cols='50' rows='8'
style="width: 375px"><?php
if(!empty($_POST['message'])){
echo $_POST['message'];
}
?></textarea></p>
<p style="text-align: center;"><input type='submit' name='submit' value="Send Email"></p>
</fieldset>
</form>
</div>
<p> </p>
</div>
<div class="clearingdiv"> </div>
</div>
<div id="footer">@2006 Codetuts-CppInquiry| Design by <a href="http://www.ibentmywookie.org">Brett7481</a></div>
</div>
</body>
</html>
Comment